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

	<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>2007-04-02T16:37:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[bast]]></name></author>
		<updated>2007-04-02T16:37:27-04:00</updated>

		<published>2007-04-02T16:37:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71757#p71757</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71757#p71757"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71757#p71757"><![CDATA[
ok, i cant a [censored] of this scripting thingy. =)<br><br>But the above script is almost what i want.<br>But i want it to trigger on "myword" and put the second word in my command.<br><br>hey looser<br>triggers on hey, takes looser and put it in my command.<br><br>hey dick<br>triggers on hey, takes dick and put it in my command.<br><br>so it should trigger on a specific word i set and takes whatever other word that comes second and put it in my command.<br>=)<br>and monitor one chan and send the command in another chan.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8272">bast</a> — Mon Apr 02, 2007 4:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-03-31T16:50:21-04:00</updated>

		<published>2007-03-31T16:50:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71729#p71729</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71729#p71729"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71729#p71729"><![CDATA[
Well, in that case you'd just have to alter the message sent with putserv from something like "KICK $chan $nick :blah" into "PRIVMSG $chan :!kick $nick blah". $nick and $chan of course would depend on the actual script, as different examples in this thread choose different names for those arguments.<br><br>But in essence, putserv sends whatever string you supply to the irc-server without further parsing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Mar 31, 2007 4:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bast]]></name></author>
		<updated>2007-03-31T16:46:15-04:00</updated>

		<published>2007-03-31T16:46:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71726#p71726</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71726#p71726"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71726#p71726"><![CDATA[
nice work guys.<br>But. =)<br>i dont think i said it clear enogh thou. =)<br><br>The kick was just an exampel.<br>I want it to send a command Or just a sentence in a specifik chan. and i want it to monitor one specifik chan, and i forgot to tell that it need to catch the word and set it in the command i want to send.<br><br>ex. 1<br>&lt;user&gt;  Hey, im a n00b<br>&lt;bot&gt; triggers on Hey<br>and then it sends !command the word n00b isnt allowed<br><br>ex 2<br>&lt;user&gt;  Hey, im a wanker<br>&lt;bot&gt; triggers on Hey<br>and then it send !command the word wanker isnt allowed<br><br>so it should trigger on Hey and catch both wanker and n00b and set this into whatever command i want to send.<br>i hope this can be done. ugly or a nice way dosent matter.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8272">bast</a> — Sat Mar 31, 2007 4:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-03-31T10:34:47-04:00</updated>

		<published>2007-03-31T10:34:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71715#p71715</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71715#p71715"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71715#p71715"><![CDATA[
@Tosser^^:<br>It is fully functional, but maybe not recommendable in the sence of keeping the code clean. Nice catch anyway <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>One thing tho, is'nt the case of $chan in yourword dependant on the case used by the user triggering the commands, rather than the case it was added to the bot?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Mar 31, 2007 10:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-03-31T10:24:57-04:00</updated>

		<published>2007-03-31T10:24:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71714#p71714</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71714#p71714"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71714#p71714"><![CDATA[
nml375, there is an error in your script:<br><div class="codebox"><p>Code: </p><pre><code>foreach yourwords $yourwords { </code></pre></div>You could try this solution...<br><div class="codebox"><p>Code: </p><pre><code>set yourchans [list "#chan1" "#chan2" "#chan3"]set yourkmsg "Sorry, no :word:s allowed here"set yourwords [list "n00b" "blah" "blib"]set yourtime "60"; # in secondsif {![array exists yournicklist]} {    array set yournicklist {}}bind pubm -|- {*} yourwordbind nick -|- {*} yournickproc yournick {nick uhost hand chan newnick} {    global yourchans yournicklist yourtime    if {[lsearch -exact "$yourchans" $chan] == -1} { return }    if {![info exists yournicklist($chan:$nick)]} { return }    catch {killutimer [lindex [split $yournicklist($chan:$nick)] 0]}    set word [lindex [split $yournicklist($chan:$nick)] 1]    unset yournicklist($chan:$nick)    set yournicklist($chan:$nick) "[utimer $yourtime [list yourkick $chan $nick $word]] $word"    }}proc yourword {nick uhost hand chan text} {    global yourchans yournicklist yourwords yourtime    if {[lsearch -exact "$yourchans" $chan] == -1} { return }    if {[info exists yournicklist($chan:$nick]} { return }    set match "0"    foreach word $yourwords {        if {[string match -nocase *$word* $text]} {            set match $word            break        }    }    if {$match == "0"} { return }    set yournicklist($chan:$nick) "[utimer $yourtime [list yourkick $chan $nick $match]] $match"}proc yourkick {chan nick word} {    if {[lsearch -exact "$yourchans" $chan] == -1} { return }    if {[onchan $nick $chan] &amp;&amp; [botisop $chan]} {        regsub -all :word: $yourkmsg "$word" kmsg        putserv "KICK $chan $nick :$kmsg"    }    unset yournicklist($chan:$nick)}</code></pre></div>Its not tested, it might work.. it might not, but its mainly a base you can build on...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Mar 31, 2007 10:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-03-31T09:05:04-04:00</updated>

		<published>2007-03-31T09:05:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71713#p71713</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71713#p71713"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71713#p71713"><![CDATA[
@iamdeath:<br>Actually, your code would trigger on any channel, but do the kick in a predefined channel. In case someone used multiple triggers in a single message, this would stack kick-timers causing unneccesary penalty points (I admit, even the fixed code does not check for pre-existing timers on subsecuencial messages). "args" is a special variable name when used in proc-declarations, accepting an arbitrary number of arguments (each added to args as a separate list-item), and should really be avoided unless this behaviour is explicitly desired. It is also not such a good idea to use string commands such as "string tolower" on list structures, as these will also modify the delimiter characters (such as {}) in some cases. Finally, don't ever use list commands such as foreach on non-lists (strings).<br><br>One thing worth mentioning however, is that none of the current "solutions" handle the case of "badboy" changing nick after writing a bad word, hence avoiding being kicked, and also possibly getting someone else kicked.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Mar 31, 2007 9:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-03-31T08:31:31-04:00</updated>

		<published>2007-03-31T08:31:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71712#p71712</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71712#p71712"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71712#p71712"><![CDATA[
erm. metroid maybe because of 1 <div class="codebox"><p>Code: </p><pre><code>}</code></pre></div> left in the end I guess, right?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Sat Mar 31, 2007 8:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-03-31T07:23:53-04:00</updated>

		<published>2007-03-31T07:23:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71710#p71710</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71710#p71710"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71710#p71710"><![CDATA[
A <span style="text-decoration:underline">proper and fixed</span> version of the script posted by iamdeath, depends on tcl8.2 or newer (for the -nocase matching) and eggdrop1.6.17 or newer (for stripcodes):<div class="codebox"><p>Code: </p><pre><code>#Add your kick reason here.set yourkick "Your kick reason comes here."#Add your words here.set yourwords [list "n00b" "sh00b" "toob"]bind pubm - * yourprocproc yourproc {nick uhost handle channel text} { global yourchannel yourkick yourwords set text [stripcodes "c" $text] foreach yourwords $yourwords {  if {[string match -nocase "*$yourwords*" $text]} {   timer 10 [list putserv "KICK $channel $nick :$yourkick"]   break  } }}</code></pre></div>In any case, I'd probably stick with Sir_FZ's version; simpler, less prone to errors.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Mar 31, 2007 7:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2007-03-31T04:51:29-04:00</updated>

		<published>2007-03-31T04:51:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71709#p71709</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71709#p71709"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71709#p71709"><![CDATA[
It won't work either anyway.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sat Mar 31, 2007 4:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-03-30T20:15:40-04:00</updated>

		<published>2007-03-30T20:15:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71703#p71703</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71703#p71703"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71703#p71703"><![CDATA[
Sorry SirFz posting after your reply, actually I almost completed it so thought to paste it, excuse me for that:<br><div class="codebox"><p>Code: </p><pre><code>#Channel to perform command on.set yourchannel "#channel"#Add your kick reason here.set yourkick "Your kick reason comes here."#Add your words here.set yourwords {"n00b""sh00b""toob"}bind pubm - * yourprocproc ccodes:filter {str} {  regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str  return $str}proc yourproc {nick uhost handle channel args} {global yourchannel yourkick yourwordsset args [ccodes:filter $args]foreach yourwords [string tolower $yourwords] {if {[string match *$yourwords* [string tolower $args]]} {timer 10 [list putserv "KICK $yourchannel $nick :$yourkick"]}}putlog "TCL loaded."</code></pre></div>Hey I have'nt tested it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Fri Mar 30, 2007 8:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-03-30T19:44:35-04:00</updated>

		<published>2007-03-30T19:44:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71700#p71700</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71700#p71700"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71700#p71700"><![CDATA[
This example should help you<div class="codebox"><p>Code: </p><pre><code>bind pubm - "% *n00b*" time:kickproc time:kick {nick uhost hand chan arg} { timer 10 [list putserv "kick $chan $nick :sorry, n00bs aint alllowed in here"]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Mar 30, 2007 7:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bast]]></name></author>
		<updated>2007-03-30T17:09:19-04:00</updated>

		<published>2007-03-30T17:09:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71698#p71698</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71698#p71698"/>
		<title type="html"><![CDATA[[REQ]Catch word and Send command after x time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71698#p71698"><![CDATA[
Hey guys.<br><br>Is it possible to get a script that could catch a specific word in a channel and execute a command after a period of time.<br><br>ex.<br><br>user1: hey, im a n00b<br>Scripts checks n00b, and hold that for 10 min  then it execute a command in a specifik chan.<br>!kick sorry, n00bs aint alllowed in here<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8272">bast</a> — Fri Mar 30, 2007 5:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
