<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/16811" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2009-07-27T06:36:58-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/16811</id>

		<entry>
		<author><name><![CDATA[Repdientu]]></name></author>
		<updated>2009-07-27T06:36:58-04:00</updated>

		<published>2009-07-27T06:36:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89679#p89679</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89679#p89679"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89679#p89679"><![CDATA[
if i want to type:<br>&lt;Rdt&gt; hello XXX<br>&lt;ChanBot&gt; Hi XXX. Good day.<br>??? <br>thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10625">Repdientu</a> — Mon Jul 27, 2009 6:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[username]]></name></author>
		<updated>2009-07-27T02:13:20-04:00</updated>

		<published>2009-07-27T02:13:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89678#p89678</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89678#p89678"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89678#p89678"><![CDATA[
After <div class="codebox"><p>Code: </p><pre><code>set response [lindex $vResponses [rand [llength $vResponses]]]</code></pre></div> add line <div class="codebox"><p>Code: </p><pre><code>set response [subst -nocommands $response]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6813">username</a> — Mon Jul 27, 2009 2:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Repdientu]]></name></author>
		<updated>2009-07-27T01:58:43-04:00</updated>

		<published>2009-07-27T01:58:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89677#p89677</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89677#p89677"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89677#p89677"><![CDATA[
i change this but it not worked:<div class="codebox"><p>Code: </p><pre><code># space delimited list of channels that the script will function inset vChannels "#VinaChat #Game"# list of channel text words/phrases that the bot will respond toset vGreets {    "hi"    "hey"    "hello"    "hi all"    "chao"    "good morning"    "good evening"}# list of possibe responses from which one will be chosen randomly for the bot's responseset vResponses {    "hello $nick. Good day"    "hi $nick"    "hey $nick"    "what? $nick"    "go away $nick"}# output type for bot's response# 1 = action# 2 = channel text# 3 = private query to nick# 4 = notice to nickset vType 2bind PUBM - * pRespondproc pRespond {nick uhost hand channel txt} {    global vChannels vGreets vResponses vType    if {[lsearch -exact [string tolower $vChannels] [string tolower $channel]] != -1} {        if {![isbotnick $nick]} {            foreach phrase $vGreets {                if {[regexp -- [subst -nobackslashes {(?i)\m$phrase\M}] $txt]} {                    set response [lindex $vResponses [rand [llength $vResponses]]]                    switch -- $vType {                        1 {putquick "PRIVMSG $channel :\001ACTION $response\001"}                        2 {putquick "PRIVMSG $channel :$response"}                        3 {putquick "PRIVMSG $nick :$response"}                        4 {putquick "NOTICE $nick :$response"}                    }                    break                }            }        }    }    return 0} </code></pre></div>when i type:<br>&lt;Rdt&gt; hi<br>&lt;ChanBot&gt; hi $nick<br>&lt;Rdt&gt;hello<br>&lt;ChanBot&gt;hello $nick. Good day<br><br>i want to fix $nick = Rdt <br>Eg:<br>&lt;Rdt&gt;hello<br>&lt;ChanBot&gt; hello Rdt. Good day<br>????<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10625">Repdientu</a> — Mon Jul 27, 2009 1:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kny]]></name></author>
		<updated>2009-04-17T13:19:39-04:00</updated>

		<published>2009-04-17T13:19:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88484#p88484</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88484#p88484"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88484#p88484"><![CDATA[
Thanks very much, I really appreciate the help. <br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10599">kny</a> — Fri Apr 17, 2009 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-04-17T10:35:59-04:00</updated>

		<published>2009-04-17T10:35:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88478#p88478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88478#p88478"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88478#p88478"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># space delimited list of channels that the script will function inset vChannels "#eggTCL #nothing"# list of channel text words/phrases that the bot will respond toset vGreets {    "hi"    "hey"    "hello"    "g'day"    "sup?"    "good morning"    "good evening"}# list of possibe responses from which one will be chosen randomly for the bot's responseset vResponses {    "shut up"    "hi"    "hey"    "what?"    "go away"}# output type for bot's response# 1 = action# 2 = channel text# 3 = private query to nick# 4 = notice to nickset vType 2bind PUBM - * pRespondproc pRespond {nick uhost hand channel txt} {    global vChannels vGreets vResponses vType    if {[lsearch -exact [string tolower $vChannels] [string tolower $channel]] != -1} {        if {![isbotnick $nick]} {            foreach phrase $vGreets {                if {[regexp -- [subst -nobackslashes {(?i)\m$phrase\M}] $txt]} {                    set response [lindex $vResponses [rand [llength $vResponses]]]                    switch -- $vType {                        1 {putquick "PRIVMSG $channel :\001ACTION $response\001"}                        2 {putquick "PRIVMSG $channel :$response"}                        3 {putquick "PRIVMSG $nick :$response"}                        4 {putquick "NOTICE $nick :$response"}                    }                    break                }            }        }    }    return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Fri Apr 17, 2009 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-04-17T05:35:43-04:00</updated>

		<published>2009-04-17T05:35:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88473#p88473</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88473#p88473"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88473#p88473"><![CDATA[
Send the output message to the channel as normal chat :-<br><div class="codebox"><p>Code: </p><pre><code>putquick "PRIVMSG $channel :output text here"</code></pre></div>Send the message to a nick as a private message (can be annoying because it opens a private message window) :-<br><div class="codebox"><p>Code: </p><pre><code>putquick "PRIVMSG $nick :output text here"</code></pre></div>Send the message to a nick as a notice :-<br><div class="codebox"><p>Code: </p><pre><code>putquick "NOTICE $nick :output text here"</code></pre></div>One or more of the posts above demonstrate a means of preconfiguring different text triggers and responding to them.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Fri Apr 17, 2009 5:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kny]]></name></author>
		<updated>2009-04-16T13:58:20-04:00</updated>

		<published>2009-04-16T13:58:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88458#p88458</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88458#p88458"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88458#p88458"><![CDATA[
<blockquote class="uncited"><div>You seem to be picking up rtf (rich text format) tags from somewhere when you copy paste into your text editor and save as a .tcl file.</div></blockquote>That's the one, thanks a lot for spotting, I'd never have known. I'm using a flat/fresh version of OS X and didn't set the text editor to save as plain text. The script(s) shown above now work - thank you to those who have contributed, but I have two final questions and I'll leave you all alone. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br><br>The scripts cache has kindly provided means the bots responds with a /me action as opposed to a standard /say <br><br>- How would I alter that<br>- And how would I alter what the initial 'hi' trigger is, so the bot uses a different word (or two) to act upon?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10599">kny</a> — Thu Apr 16, 2009 1:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-04-16T13:26:43-04:00</updated>

		<published>2009-04-16T13:26:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88457#p88457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88457#p88457"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88457#p88457"><![CDATA[
You seem to be picking up rtf (rich text format) tags from somewhere when you copy paste into your text editor and save as a .tcl file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Apr 16, 2009 1:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kny]]></name></author>
		<updated>2009-04-16T12:45:35-04:00</updated>

		<published>2009-04-16T12:45:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88456#p88456</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88456#p88456"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88456#p88456"><![CDATA[
I've just tried the same test script on a second bot I'm running using 1.6.17, on a true shell provider and get the same issue.<br><br>I wanted to test this, as the one I want to add this script on is running off Mac OS X, so I wanted to eliminate OS X from the equation and also the versioning differences.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10599">kny</a> — Thu Apr 16, 2009 12:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kny]]></name></author>
		<updated>2009-04-16T12:38:52-04:00</updated>

		<published>2009-04-16T12:38:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88455#p88455</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88455#p88455"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88455#p88455"><![CDATA[
Here's what's happened after trying the updated script:<br><div class="codebox"><p>Code: </p><pre><code>[17:36:05] &lt;bot&gt; Rehashing.[17:36:05] &lt;bot&gt; [17:36] Writing user file...[17:36:05] &lt;bot&gt; [17:36] Writing channel file...[17:36:05] &lt;bot&gt; [17:36] Rehashing ...[17:36:05] &lt;bot&gt; [17:36] Listening at telnet port 3366 (all).[17:36:05] &lt;bot&gt; [17:36] Tcl error in file 'bot.conf':[17:36:05] &lt;bot&gt; [17:36] invalid command name "\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430[17:36:05] &lt;bot&gt; {\fonttbl\f0\fmodern\fcharset0 Courier;}[17:36:05] &lt;bot&gt; {\colortbl;\red255\green255\blue255;\red18\green131\blue4;}[17:36:05] &lt;bot&gt; \paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0[17:36:05] &lt;bot&gt; \deftab720[17:36:05] &lt;bot&gt; \pard\pardeftab720\ql\qnatural[17:36:05] &lt;bot&gt; [17:36:05] &lt;bot&gt; \f0\fs22 \cf2 #  \'a0set hi_flood_control 0  \'a0set his_msg \{  \'a0"Hi 4"  \'a0"Hi 3"  \'a0"Hi 2"  \'a0"Hi 1"   \}  bind pubm -|- "*hi*" hi:reply  proc hi:reply \{nick uhost handle channel text\} \{ [17:36:05] &lt;bot&gt; [17:36] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)-DCC session closed</code></pre></div>I'm using Eggdrop v1.6.19 if that makes any difference?<br><br>Cheers folks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10599">kny</a> — Thu Apr 16, 2009 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2009-04-16T03:56:40-04:00</updated>

		<published>2009-04-16T03:56:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88453#p88453</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88453#p88453"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88453#p88453"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># set hi_flood_control 0 set his_msg { "Hi 4" "Hi 3" "Hi 2" "Hi 1"}bind pubm -|- "*hi*" hi:replyproc hi:reply {nick uhost handle channel text} {   global hi_flood_control his_msg   if {$hi_flood_control == "1"} {return 0}   set hi_flood_control 1   timer 240 [list set hi_flood_control 0]   set temp_hi $his_msg   set temp_hi [lindex $temp_hi [rand [llength $temp_hi]]]   putquick "PRIVMSG $channel :\001ACTION $temp_hi \001"   return 0 }#</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Thu Apr 16, 2009 3:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kny]]></name></author>
		<updated>2009-04-16T02:07:09-04:00</updated>

		<published>2009-04-16T02:07:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88449#p88449</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88449#p88449"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88449#p88449"><![CDATA[
Hi there, this is what happens:<br><div class="codebox"><p>Code: </p><pre><code>Eggdrop v1.6.19 (C) 1997 Robey Pointer (C) 2008 Eggheads[07:03] --- Loading eggdrop v1.6.19 (Thu Apr 16 2009)[07:03] Listening at telnet port 3366 (all).[07:03] Module loaded: dns             [07:03] Module loaded: channels        [07:03] Module loaded: server          [07:03] Module loaded: ctcp            [07:03] Module loaded: irc             [07:03] Module loaded: notes            (with lang support)[07:03] Module loaded: console          (with lang support)[07:03] Module loaded: blowfish        [07:03] Module loaded: uptime          [07:03] Tcl error in file 'bot.conf':[07:03] invalid command name "\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430{\fonttbl\f0\fmodern\fcharset0 Courier;}{\colortbl;\red255\green255\blue255;\red18\green131\blue4;}\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0\deftab720\pard\pardeftab720\ql\qnatural\f0\fs22 \cf2 #  \'a0set hi_flood_control 0  \'a0set hello_msg \{  \'a0"hey"  \'a0"hello"  \'a0"yo"   \}  bind pub -|- hi hi:reply  proc hi:reply \{nick uhost handle channel text\} \{  \'a0 \'a0global hi_flood_control hello_msg  \'a0 \'a0if \{$hi_flood_control == "1"\} \{return 0\}  \'a0 \'a0set hi_flood_control 1  \'a0 \'a0timer 240 [list set hi_flood_control 0]  \'a0 \'a0set temp_hi $hello_msg  \'a0 \'a0set temp_hi [lindex $temp_hi [rand [llength $temp_hi]]]  [07:03] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)</code></pre></div>If I uncomment out <strong class="text-strong">source scripts/name.tcl</strong> the bot will load up fine.<br><br><br>Thanks for the replies, folks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10599">kny</a> — Thu Apr 16, 2009 2:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2009-04-15T19:04:07-04:00</updated>

		<published>2009-04-15T19:04:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88448#p88448</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88448#p88448"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88448#p88448"><![CDATA[
<blockquote class="uncited"><div>I've PM'd cache on this, but would also like to post here in case he/she is not around for a while, but also to potentially help others and keep the fix in the forum database.<br><br>I dumped that code into a new file, gave it .tcl extension and added it to /scripts/ and placed 'source scripts/name.tcl' into my bot config. Unfortunately after a rehash it killed the bot so I've had to uncomment it out for now. <br><br>Am I missing something to add in the file? <br><br>Thanks, all.</div></blockquote>It is working fine for me. What error msg you get in logs?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Wed Apr 15, 2009 7:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-04-15T16:27:04-04:00</updated>

		<published>2009-04-15T16:27:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88446#p88446</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88446#p88446"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88446#p88446"><![CDATA[
<a href="http://forum.egghelp.org/viewtopic.php?t=15889&amp;start=17" class="postlink">http://forum.egghelp.org/viewtopic.php?t=15889&amp;start=17</a><br><br>The "putserv-o-matic" script can easily do what you want and won't crash your bot <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed Apr 15, 2009 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kny]]></name></author>
		<updated>2009-04-15T14:09:27-04:00</updated>

		<published>2009-04-15T14:09:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88445#p88445</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88445#p88445"/>
		<title type="html"><![CDATA[Simple talk-back request]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88445#p88445"><![CDATA[
I've PM'd cache on this, but would also like to post here in case he/she is not around for a while, but also to potentially help others and keep the fix in the forum database.<br><br>I dumped that code into a new file, gave it .tcl extension and added it to /scripts/ and placed 'source scripts/name.tcl' into my bot config. Unfortunately after a rehash it killed the bot so I've had to uncomment it out for now. <br><br>Am I missing something to add in the file? <br><br>Thanks, all.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10599">kny</a> — Wed Apr 15, 2009 2:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
