<?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/10756" />

	<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>2005-11-07T08:28:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-11-07T08:28:32-04:00</updated>

		<published>2005-11-07T08:28:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57161#p57161</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57161#p57161"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57161#p57161"><![CDATA[
The joys (?) of Tcl. lol<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon Nov 07, 2005 8:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[miT]]></name></author>
		<updated>2005-11-07T02:23:48-04:00</updated>

		<published>2005-11-07T02:23:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57148#p57148</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57148#p57148"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57148#p57148"><![CDATA[
<blockquote class="uncited"><div>I do not seem to be able to reproduce any error:<div class="codebox"><p>Code: </p><pre><code>[15:54]Alchera Big_Brother is watchingBarry [14:54] !Learn! Word Added: Big_Brother =&gt; watching[15:55] Alchera what is Big_Brother?Barry [14:55] !Learn! Word Added: what =&gt; Big_Brother?Barry [14:55] !Learn! Question asked by Alchera-Away in #ballaarat :: Big_Brother : what is Big_Brother</code></pre></div><blockquote class="uncited"><div>eggdrop v1.6.17, on CYGWIN_NT-5.1 1.5.18(0.132/4/2)</div></blockquote></div></blockquote>It randomly started working. My guess is, that it needed a populated database. After having the script loaded and the bot idleing in chan for about a day, it just started talking back out of no where.<br><br>Very spooky.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6931">miT</a> — Mon Nov 07, 2005 2:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-11-06T01:02:31-04:00</updated>

		<published>2005-11-06T01:02:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57110#p57110</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57110#p57110"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57110#p57110"><![CDATA[
I do not seem to be able to reproduce any error:<div class="codebox"><p>Code: </p><pre><code>[15:54]Alchera Big_Brother is watchingBarry [14:54] !Learn! Word Added: Big_Brother =&gt; watching[15:55] Alchera what is Big_Brother?Barry [14:55] !Learn! Word Added: what =&gt; Big_Brother?Barry [14:55] !Learn! Question asked by Alchera-Away in #ballaarat :: Big_Brother : what is Big_Brother</code></pre></div><blockquote class="uncited"><div>eggdrop v1.6.17, on CYGWIN_NT-5.1 1.5.18(0.132/4/2)</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sun Nov 06, 2005 1:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[miT]]></name></author>
		<updated>2005-11-05T21:20:32-04:00</updated>

		<published>2005-11-05T21:20:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57102#p57102</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57102#p57102"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57102#p57102"><![CDATA[
<blockquote class="uncited"><div>Replace<div class="codebox"><p>Code: </p><pre><code>rand [llength [split [chanlist "$chan"]]]</code></pre></div>with<div class="codebox"><p>Code: </p><pre><code>rand [llength [chanlist $chan]]</code></pre></div></div></blockquote><br>Replaced that and got this error:<br><div class="codebox"><p>Code: </p><pre><code>Currently: random limit must be greater than zeroCurrently:     while executingCurrently: "rand [llength [chanlist $chan]]"Currently:     (procedure "infobot_nick" line 2)Currently:     invoked from withinCurrently: "infobot_nick $chan"Currently:     (procedure "infoegg_question" line 57)Currently:     invoked from withinCurrently: "infoegg_question $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6931">miT</a> — Sat Nov 05, 2005 9:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-11-05T11:05:58-04:00</updated>

		<published>2005-11-05T11:05:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57085#p57085</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57085#p57085"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57085#p57085"><![CDATA[
Replace<div class="codebox"><p>Code: </p><pre><code>rand [llength [split [chanlist "$chan"]]]</code></pre></div>with<div class="codebox"><p>Code: </p><pre><code>rand [llength [chanlist $chan]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Nov 05, 2005 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[miT]]></name></author>
		<updated>2005-11-05T02:49:47-04:00</updated>

		<published>2005-11-05T02:49:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57073#p57073</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57073#p57073"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57073#p57073"><![CDATA[
<blockquote class="uncited"><div># Comment these two lines if you wish to enable the .tcl and .set commands.<br># If you select your owners wisely, you should be okay enabling these.<br>unbind dcc n tcl *dcc:tcl<br>unbind dcc n set *dcc:set</div></blockquote>Currently: random limit must be greater than zero<br>Currently:     while executing<br>Currently: "rand [llength [split [chanlist "$chan"]]]"<br>Currently:     (procedure "infobot_nick" line 2)<br>Currently:     invoked from within<br>Currently: "infobot_nick $chan"<br>Currently:     (procedure "infoegg_question" line 57)<br>Currently:     invoked from within<br>Currently: "infoegg_question $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6931">miT</a> — Sat Nov 05, 2005 2:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-11-04T20:34:28-04:00</updated>

		<published>2005-11-04T20:34:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57071#p57071</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57071#p57071"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57071#p57071"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div><strong class="text-strong">.set errorInfo</strong> and paste the output.</div></blockquote>i do not have that command available. is there a log i can paste instead?<br><br>thanks,</div></blockquote>eggdrop.conf:<blockquote class="uncited"><div># Comment these two lines if you wish to enable the .tcl and .set commands.<br># If you select your owners wisely, you should be okay enabling these.<br>unbind dcc n tcl *dcc:tcl<br>unbind dcc n set *dcc:set</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Fri Nov 04, 2005 8:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[miT]]></name></author>
		<updated>2005-11-04T16:24:45-04:00</updated>

		<published>2005-11-04T16:24:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57066#p57066</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57066#p57066"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57066#p57066"><![CDATA[
<blockquote class="uncited"><div><strong class="text-strong">.set errorInfo</strong> and paste the output.</div></blockquote>i do not have that command available. is there a log i can paste instead?<br><br>thanks,<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6931">miT</a> — Fri Nov 04, 2005 4:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-11-04T09:54:22-04:00</updated>

		<published>2005-11-04T09:54:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57058#p57058</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57058#p57058"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57058#p57058"><![CDATA[
<strong class="text-strong">.set errorInfo</strong> and paste the output.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Nov 04, 2005 9:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[miT]]></name></author>
		<updated>2005-11-03T20:55:23-04:00</updated>

		<published>2005-11-03T20:55:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57043#p57043</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57043#p57043"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57043#p57043"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>Maybe i need to update to a newer version of eggdrop.</div></blockquote>You are already using the latest stable release of eggdrop/Windrop.<br><br>Script shown is 4 yrs old! Update your scripts.</div></blockquote>Yes i am aware the script is quite old, but i was just trying others to see if the problem was just with one type of info bot. I was just posting it to see if anyone knew why i was getting that type of error with all of my info bot scripts that ive tried.<br><blockquote class="uncited"><div>Contact eggfu author regarding bugs.</div></blockquote>The <a href="http://sourceforge.net/projects/egg-fu" class="postlink">Egg-fu sourceforge progject page</a> specifys that they do not have support for windrop users.<br><br>Perhaps someone has an easy work around that might possibly work. I would love to post it for other windows users to use as it seems to be an epidemic.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6931">miT</a> — Thu Nov 03, 2005 8:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-11-03T20:24:56-04:00</updated>

		<published>2005-11-03T20:24:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57040#p57040</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57040#p57040"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57040#p57040"><![CDATA[
<blockquote class="uncited"><div>Maybe i need to update to a newer version of eggdrop.</div></blockquote>You are already using the latest stable release of eggdrop/Windrop.<br><br>Script shown is 4 yrs old! Update your scripts.<br><br>Contact eggfu author regarding bugs.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Thu Nov 03, 2005 8:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[miT]]></name></author>
		<updated>2005-11-03T19:06:32-04:00</updated>

		<published>2005-11-03T19:06:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57036#p57036</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57036#p57036"/>
		<title type="html"><![CDATA[infoegg.tcl - random limit must be greater than zero]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57036#p57036"><![CDATA[
I am getting the following error when my info bot script tries to pick a response to say in channel.<br><div class="codebox"><p>Code: </p><pre><code> [14:31] &lt;Ish_nitti&gt; Big_Brother is watching[14:31] !Learn! Word Added: Big_Brother =&gt; watching[14:31] !Learn! Word Added: what =&gt; Big_Brother?[14:31] &lt;Ish_nitti&gt; what is Big_Brother?[14:31] !Learn! Question asked by Ish_nitti in #chatzone :: Big_Brother : what is Big_Brother[14:31] Tcl error [infoegg_question]: random limit must be greater than zero</code></pre></div>This error happens with the eggfu script also. Maybe i need to update to a newer version of eggdrop. I am currently using <strong class="text-strong">Eggdrop v1.6.17</strong> on <strong class="text-strong">CYGWIN_NT-5.0 1.5.18(0.132/4/2)</strong>.<br><br><br>Here is the script:<br><div class="codebox"><p>Code: </p><pre><code>#    __          ___                             #   |__|.-----..'  _|.-----..-----..-----..-----.#   |  ||     ||   _||  _  ||  -__||  _  ||  _  |#   |__||__|__||__|  |_____||_____||___  ||___  |#                                  |_____||_____|#                              version 1.3#                              www.zeen.co.uk#                              goatqueen@zeen.co.uk#                              Darren Moore - February 22th 2001#                              irc.zirc.org# Version Information#1.0 - Loads of bugs, not many features#1.1 - Most bugs ironed out#      Can delete/alter variables#      Tagging variables for picking up 'wtf' 'what' etc...#      Karma crap added#      Tell &lt;nick&gt; &lt;question&gt;? Added#      Word file made better and moved#1.2 - Lock words so they can't be set#      Tagging is allowed to anyone#      Little vital bugs fixed#      Extra variables e.g. $animal and $date are more efficient#      Random responses, x is a|b|c|d#      $nick Chooses a random nick out of the channel "gay is &lt;reply&gt; I'd guess $nick is gay"#      Fixed a return problem, no more dysyncing db!#1.3 - No change/Free, this 'locks' the word so it can't be changed (need o)#      #      #      #      #      ### UPDATE!# I have smashed, bashed this around. I have let hackers loose on the bot and# they can't 'hack' me little bot :)# Have a churn at it and tell me if you manage to exploit anything.################### infoegg - Based on infobot# # Infoegg talks, reacts just like infobot, it was actually based on the infobot.# I was getting sick of using infobot's because I could not find it easy to configure# so I looked at some learn scripts for eggdrops, they where all crap! I mean they# weren't smart at all so I thought of making an eggdrop version of infobot, here it is!# # I'm still working on bits of this script like status and date but I don't really# like TCL that much and can't find any real good resources, maybe I'll have to go# and buy a manual if this script is successful :P# # This bot learns from things like 'dtr is a queer' and if someone says dtr? it will say# 'i heard dtr is a queer'. The database is just a basic list separated with '=&gt;' just# like infobot infopacks so you can import these in! l33t :)# # If it learns words like 'this' 'that' 'why' then type 'lock this' etc.. cause then the# word can't be used.## Hellos and thanks go out to:# Popeye, DTR, SmuDgeR, Ubu, Ed, Trax, Houlie, Pongyi + anyone else## E-Mail me with suggestions and comments - zeen@zeen.co.uk############################# set factoid: 'x is y'      # random factoid:'x is a|b|c|d'# accessing factoid: 'what is x?' - or just 'x?'# delete factoid:'forget x'(need o)# append factoid:'x is also y'# changing factoid:'no, x is y'# disable factoid (loose):'tag x'# lock factoid (so it can't be used):'lock x'(need o)# unlock factoid:'unlock x'(need o)# nochange factoid:'nochange x'(need o)# disable nochange:'free x'(need o)# alter factoid:'x =~ s/a/b/'# tell factoid:'tell nick x?'## access karma:'karma for x?' - or '&lt;karma&gt; x?'# increase karma:'x++'# decrease karma:'x--'# set karma:'karma set x 1'# reset karma:'karma reset x'############## Please change the details below (to work in all channels leave it blank!)set infoegg_version "v1.2"set infoegg_chans ""set infoegg_flood 0set botsnick "Big_Brother"set wordfile "words.txt"### Don't need to touch the stuff below this linebind pubm - "*\\\!" infoegg_questionbind pubm - "*\\\?" infoegg_questionproc infoegg_question {nick host hand chan text} {global botsnickglobal wordfileglobal infoegg_floodglobal infoegg_chansglobal infoegg_versionif {(([lsearch -exact [string tolower $infoegg_chans] [string tolower $chan]] != -1) || ($infoegg_chans == "")) &amp;&amp; ([string match "*\\\?" $text] &amp;&amp; [string length $text] != 1 || [string match "*\\\!" $text] &amp;&amp; [string length $text] != 1)} {set getquestion_pos [llength $text]incr getquestion_pos -1regsub -all "\\\!" $text "" textset start [lindex $text 0]set getquestion [string trimright [lindex $text $getquestion_pos] ?]set getquestion2 [string trimright [lrange $text 0 $getquestion_pos] ?]if {$getquestion == "me?"} { set getquestion $nick }putlog "!Learn! Question asked by $nick in $chan :: $getquestion : $getquestion2"## get it asking twice, 2nd time with 2 wordsset lquestion $getquestion2if {$lquestion == "infoegg" || $lquestion == "infobot"} {set question "&lt;reply&gt; Infoegg $infoegg_version for eggdrops created by zeen (zeen@zeen.co.uk), www.zeen.co.uk"} elseif {$lquestion == "status"} {#set infoegg_lines 0#set fh [open $wordfile r]#set returnword {}#while {![eof $fh]} { incr infoegg_lines 1 }#close $fhputlog "!Learn! Status";set question "Current Factoids: $infoegg_lines"} else {set question [infoegg_get_word $getquestion2]}if {$question == "" &amp;&amp; $getquestion2 != $getquestion} { set lquestion $getquestionset question [infoegg_get_word $getquestion]}if {[lindex $question 0] == "!"} {# Strip nochange ! charset question [string range $question 2 [string length $question]]}regsub -all "\{" $question "" questionregsub -all "\}" $question "" questionregsub -all "\\\$who" $question $nick questionregsub -all "\\\$date" $question "[ctime [unixtime]]" questionregsub -all "\\\$month" $question "[infobot_month]" questionregsub -all "\\\$day" $question "[infobot_day]" questionregsub -all "\\\$animal" $question "[infobot_animal]" questionregsub -all "\\\$nick" $question "[infobot_nick $chan]" question# Random Seedset israndom [lsearch -exact $question "|"]if {$israndom != -1} { set question "[infobot_randq $question]" }#############set sendto $chanif {$start == "tell"} {set nwhom [lsearch -exact $text "tell"] set grabsend [lindex $text [expr $nwhom +1]]if {$grabsend != ""} {set sendto $grabsend}}if {$question != "" &amp;&amp; $question != "`" &amp;&amp; $question != "~"} {set randno [rand 10]set getstart [lindex $question 0] set getrest [lrange $question 1 end] if {$getstart == "&lt;reply&gt;"} {  putserv "PRIVMSG $sendto :$getrest"} elseif {$getstart == "&lt;action&gt;"} {  putserv "PRIVMSG $sendto :\001ACTION $getrest\001"} else {if {$randno == "0"} { set randmsg "I heard that $lquestion is $question" }if {$randno == "1"} { set randmsg "$lquestion is $question" }if {$randno == "2"} { set randmsg "It's been said that $lquestion is $question" }if {$randno == "3"} { set randmsg "Someone said that $lquestion is $question" }if {$randno == "4"} { set randmsg "$lquestion is probably $question" }if {$randno == "5"} { set randmsg "I guess $lquestion is $question" }if {$randno == "6"} { set randmsg "Hmmm. I think $lquestion is $question" }if {$randno == "7"} { set randmsg "I'm sure $lquestion is $question" }if {$randno == "8"} { set randmsg "I guess $lquestion is $question" }if {$randno == "9"} { set randmsg "Well, $lquestion is $question" }if {$randno == "10"} { set randmsg "I think $lquestion is $question" }putserv "PRIVMSG $sendto :$randmsg"}} elseif {$start == "$botsnick,"} {set randno [rand 5]if {$randno == "0"} { set randmsg "No idea $nick!" }if {$randno == "1"} { set randmsg "God knows $nick!" }if {$randno == "2"} { set randmsg "Got no idea $nick" }if {$randno == "3"} { set randmsg "I don't know $nick" }if {$randno == "4"} { set randmsg "Really don't know $nick" }if {$randno == "5"} { set randmsg "Fook knows" }putserv "PRIVMSG $sendto :$randmsg"}}}proc infoegg_resetflood {} {global infoegg_floodset infoegg_flood 0}bind pubm - "* is *" infoegg_learnproc infoegg_learn {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" text# [censored] colours, underline and bold! no need, look uglyregsub -all \02 $text "" textregsub -all \031 $text "" textregsub -all \03 $text "" text#############regsub -all "\{" $text "" textregsub -all "\}" $text "" text#############if {[lsearch -exact $text \n] != -1} { # Fix the break return bugputserv "PRIVMSG $chan :String cannot have returns!";} else {set type [lsearch -exact $text "is"]if {$type != "-1"} { set type "is"} {set type "are"}set nwhom [lsearch -exact $text "$type"]set whatis [lrange $text 0 [expr $nwhom - 1]]set whatis2 [lrange $text [expr $nwhom + 1] end]set also [lindex $text [expr $nwhom + 1]]# replace a few thingsregsub -all "my" $whatis2 "$nick's" whatis2regsub -all "i am" $whatis2 "$nick is" whatis2set start [lindex $text 0]set question {}set orginal {}if {$start == "no,"} {set whatis [lrange $whatis 1 end]set orginal [infoegg_get_word $whatis]if {$orginal != "~" &amp;&amp; [lindex $orginal 0] != "!"} {infoegg_del_word $whatis}} elseif {$also == "also"} {set question [infoegg_get_word $whatis]if {$question != ""} {infoegg_del_word $whatisset whatis2 "$question and also [lrange $whatis2 1 end]"putlog "!Learn! Also used by $nick"set question {}}} else {set question [infoegg_get_word $whatis]}if {$question == "" &amp;&amp; $orginal != "~" &amp;&amp; [lindex $orginal 0] != "!" &amp;&amp; [string length $whatis] &gt;= 3 &amp;&amp; [string length $whatis] &lt;= 15}  { infoegg_add_word $whatis $whatis2putlog "!Learn! Word Added: $whatis =&gt; $whatis2"if {$start == "no," || $start == "tag,"} { putserv "PRIVMSG $chan :Ok $nick" }} elseif {[string length $whatis] &lt;= 3} {if {$start == "no," || $start == "tag,"} { putserv "PRIVMSG $chan :String too short $nick!" }} elseif {[string length $whatis] &gt;= 15} {if {$start == "no," || $start == "tag,"} { putserv "PRIVMSG $chan :String too long $nick!" }}}}bind pubm - "* \\\=\\\~ *" infoegg_alterproc infoegg_alter {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" textregsub -all " s/" $text " " textregsub -all "/" $text " / " textset fseperator [lsearch -exact $text "=~"]set seperator [lsearch -exact $text "\/"]set alterstring [lrange $text 0 [expr $fseperator -1]]set alterwhat [lrange $text 2 [expr $seperator -1]]set alterwith [lrange $text [expr $seperator +1] end]regsub -all " /" $alterwith "" alterwithset question [infoegg_get_word $alterstring]set searchforwhat [lsearch -exact $question $alterwhat]if {$question == "~" || $question == "`"} {putserv "PRIVMSG $chan :This variable has been locked/tagged $nick!"} elseif {[lindex $question 0] == "!"} {putserv "PRIVMSG $chan :This variable has been set as nochange $nick!"} elseif {$question == ""} {putserv "PRIVMSG $chan :There's no variable set in the first place $nick!"} elseif {$searchforwhat == "-1"} {putserv "PRIVMSG $chan :$alterwhat doesn't exist in $alterstring!"} else {regsub -all $alterwhat $question $alterwith resultinfoegg_del_word $alterstringinfoegg_add_word $alterstring $resultputlog "!Learn! Alter: $question /is now/ $result"putserv "PRIVMSG $chan :Ok $nick, $alterstring is altered"}}bind pub o "nochange" infoegg_nochangeproc infoegg_nochange {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" textset nwhom [lsearch -exact $text "nochange"]set tagwhat [lrange $text [expr $nwhom + 1] end]set answer [infoegg_get_word $tagwhat]if {[lindex $answer 0] == "!"} {putserv "PRIVMSG $chan :This word has already been nochanged $nick"} elseif {$tagwhat != ""} {infoegg_del_word $tagwhatinfoegg_add_word $tagwhat "! $answer"putserv "PRIVMSG $chan :Ok $nick, $tagwhat has been set as nochange"} {putserv "PRIVMSG $chan :Enter a word to be nochanged $nick"}}bind pub o "free" infoegg_freeproc infoegg_free {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" textset nwhom [lsearch -exact $text "free"]set tagwhat [lrange $text [expr $nwhom + 1] end]set answer [infoegg_get_word $tagwhat]set answer [string range $answer 2 [string length $answer]]if {$tagwhat != ""} {if {$answer == ""} {putserv "PRIVMSG $chan :Nothing to free $nick!"} {infoegg_del_word $tagwhatinfoegg_add_word $tagwhat "$answer"putserv "PRIVMSG $chan :Ok $nick, $tagwhat has been freed"}} {putserv "PRIVMSG $chan :Enter a word to be freed $nick"}}bind pub - "tag" infoegg_tagproc infoegg_tag {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" textset nwhom [lsearch -exact $text "tag"]set tagwhat [lrange $text [expr $nwhom + 1] end]set answer [infoegg_get_word $tagwhat]if {[lindex $answer 0] == "!"} {putserv "PRIVMSG $chan :This word has been set as nochange $nick"} elseif {$tagwhat != ""} {infoegg_del_word $tagwhatinfoegg_add_word $tagwhat "`"putlog "!Learn! Tagged $tagwhat"putserv "PRIVMSG $chan :Ok $nick, $tagwhat tagged"} {putserv "PRIVMSG $chan :Enter a word to be tagged $nick"}}bind pub o "lock" infoegg_lockproc infoegg_lock {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" textset nwhom [lsearch -exact $text "lock"]set lockwhat [lrange $text [expr $nwhom + 1] end]set answer [infoegg_get_word $lockwhat]if {[lindex $answer 0] == "!"} {putserv "PRIVMSG $chan :This word has been set as nochange $nick"} elseif {$lockwhat != ""} {infoegg_del_word $lockwhatinfoegg_add_word $lockwhat "~"putlog "!Learn! Locked $lockwhat"putserv "PRIVMSG $chan :Ok $nick, $lockwhat locked"} {putserv "PRIVMSG $chan :Enter a word to be locked $nick"}}bind pub o "unlock" infoegg_unlockproc infoegg_unlock {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" textset nwhom [lsearch -exact $text "unlock"]set lockwhat [lrange $text [expr $nwhom + 1] end]set answer [infoegg_get_word $lockwhat]if {[lindex $answer 0] == "!"} {putserv "PRIVMSG $chan :This word has been set as nochange $nick"} elseif {$lockwhat != ""} {infoegg_del_word $lockwhatputlog "!Learn! UnLocked $lockwhat"putserv "PRIVMSG $chan :Ok $nick, $lockwhat unlocked"} {putserv "PRIVMSG $chan :Enter a word to be unlocked $nick"}}bind pub o "forget" infoegg_forgetproc infoegg_forget {nick host hand chan text} {global botsnickregsub -all "$botsnick, " $text "" textset nwhom [lsearch -exact $text "forget"]set forgetwhat [lrange $text [expr $nwhom + 1] end]set question [infoegg_get_word $forgetwhat]if {[lindex $question 0] == "!"} {putserv "PRIVMSG $chan :This word has been set as nochange $nick"} elseif {$question == ""} {putserv "PRIVMSG $chan :'$forgetwhat' not found $nick!"} elseif {$forgetwhat != "" || [llength $forgetwhat] &gt; 3} {infoegg_del_word $forgetwhatputserv "PRIVMSG $chan :Ok $nick"} else {putserv "PRIVMSG $chan :$nick set a forget or make it longer!"}}bind pub - "karma" karma_infoproc karma_info {nick host hand chan text} {global botsnickset karma_action [lindex $text 0]regsub -all "\\\?" $text "" textset karma [lindex $text 1]if {$karma == "me"} { set karma $nick }if {$karma == ""} {putserv "PRIVMSG $chan :You have not entered a karma option 'karma for/set/reset'"} elseif {$karma_action == "for"} {set answer [infoegg_get_word "&lt;karma&gt; $karma"]if {$answer == "" || $answer == "0"} {putserv "PRIVMSG $chan :$karma has neutral karma"} {putserv "PRIVMSG $chan :$karma has karma of $answer"}} elseif {$karma_action == "set"} {set karma_setas [lindex $text 2]if {$karma == $nick} {putserv "NOTICE $nick :please don't karma yourself"} elseif {$karma_setas != ""} {putlog "!Karma! $karma been changed to $karma_setas"infoegg_del_word "&lt;karma&gt; $karma"infoegg_add_word "&lt;karma&gt; $karma" $karma_setasputserv "PRIVMSG $chan :$karma has now been set to $karma_setas"} {putserv "PRIVMSG $chan :You have not entered a set value! 'karma set &lt;karma&gt; &lt;new value&gt;'"}} elseif {$karma_action == "reset"} {if {$karma == $nick} {putserv "NOTICE $nick :please don't karma yourself"} else {infoegg_del_word "&lt;karma&gt; $karma"infoegg_add_word "&lt;karma&gt; $karma" ""putserv "PRIVMSG $chan :$karma has been reset"}}}bind pubm - "*\-\-" karma_actionbind pubm - "*\+\+" karma_actionproc karma_action {nick host hand chan text} {global botsnickregsub -all "\\\+\\\+" $text " \+\+" textregsub -all "\\\-\\\-" $text " \-\-" textset karma [lindex $text 0]set question [infoegg_get_word "&lt;karma&gt; $karma"]if {$karma == "me"} { set karma $nick }if {$question == ""} {infoegg_add_word "&lt;karma&gt; $karma" 0putlog "!Karma! $karma set to 0"} elseif {[string tolower $karma] == [string tolower $nick]} {                putserv "NOTICE $nick :please don't karma yourself"        } else {if {[lsearch -exact $text "\+\+"] == -1} {incr question -1} {incr question 1}infoegg_del_word "&lt;karma&gt; $karma"infoegg_add_word "&lt;karma&gt; $karma" $questionputlog "!Karma! $karma set to $question"}}proc infoegg_add_word {keyword sayback} {global botsnickglobal wordfileset fh [open $wordfile a]puts $fh "$keyword =&gt; $sayback"close $fh}proc infoegg_get_word {keyword} {global botsnickglobal wordfileset fh [open $wordfile r]set returnword {}while {![eof $fh]} {set stdin [string trim [gets $fh]]if {[eof $fh]} { break }set breaker [lsearch -exact $stdin "=&gt;"]set getkey [lrange $stdin 0 [expr $breaker - 1]] set getresult [lrange $stdin [expr $breaker + 1] end]if {[string tolower $getkey] == [string tolower $keyword]} { set returnword $getresult }}close $fh return $returnword}proc infoegg_del_word {word} {global botsnick global wordfile set fh [open $wordfile r] set return {} set del 0 while {![eof $fh]} {set stdin [string trim [gets $fh]]if {[eof $fh]} { break }if {![regexp -nocase $word $stdin]} {lappend return $stdin} {incr del 1} } close $fh; set fh [open $wordfile w] foreach a $return {  puts $fh $a } close $fh return $del}proc infobot_animal {} {set randanimal {"goat""llama""lemming""hamster""penguin""goat""bear""emu""donkey""cat""dog""monkey""eel""monkey faced eel""iguana""hippo""bull""cow""duck""zebra""giraffe"}   return [lindex $randanimal [rand [llength $randanimal]]]}proc infobot_day {} {set randday {"Monday""Tuesday""Wednesday""Thursday""Friday""Saturday""Sunday"}   return [lindex $randday [rand [llength $randday]]]}proc infobot_nick {chan} {     set randn [lindex [split [chanlist "$chan"]] [rand [llength [split [chanlist "$chan"]]]]]   return $randn}proc infobot_month {} {set randmonth {"January""February""March""April""May""June""July""August""September""October""November""December"}   return [lindex $randmonth [rand [llength $randmonth]]]}proc infobot_randq {text} {regsub -all "\\|" $text "\t" text   set randq [lindex [split $text \t] [rand [llength [split $text \t]]]]   return $randq}</code></pre></div>Thanks for listening,<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6931">miT</a> — Thu Nov 03, 2005 7:06 pm</p><hr />
]]></content>
	</entry>
	</feed>
