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

	<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>2004-05-10T15:28:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-05-10T15:28:01-04:00</updated>

		<published>2004-05-10T15:28:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36259#p36259</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36259#p36259"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36259#p36259"><![CDATA[
Well heres the full code.<br>It is working great actually I made it for a private query message<br>spam detector eggdrop bot, which cycles the channel continuously<br>detecting spammers and inviters.<br><br>The timers don't mess up even and its working perfect.<br>Here is the full correct code if someone wants it, feel<br>free to use it:<br><blockquote class="uncited"><div>#Set the channel on which you want the bot to cycle on<br>set spamchan "#chatzone"<br><br>#How many minutes should the bot idle in channel before it parts for the cycle (in mins)<br>set spamdet_idletime "4"<br><br>#How many seconds should the bot stay gone in the cycle before rejoining the channel (in secs)<br>set spamdet_gonetime "60"<br><br><br>bind evnt - connect-server resetinactive<br>bind evnt - prerehash resetinactive<br>bind evnt - prerestart resetinactive<br><br>if {![string match *spamdetect* [timers]]} {timer $spamdet_idletime spamdetect}<br><br>proc resetinactive {type} { <br>global spamchan<br> channel set $spamchan -inactive<br> putlog "INACTIVE: Set channel settings for $spamchan back to -inactive."<br> return 1 <br>} <br><br>proc spamdetect {} {<br>global botnick spamchan spamdet_idletime spamdet_gonetime<br> channel set $spamchan +inactive<br>  putlog "CYCLE: Cycling $spamchan to detect spammers."<br>  putlog "CYCLE: Will rejoin $spamchan after $spamdet_gonetime secs."<br> utimer $spamdet_gonetime "channel set $spamchan -inactive"<br> if {![string match *spamdetect* [timers]]} {timer $spamdet_idletime spamdetect}<br>}<br></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon May 10, 2004 3:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-05-10T15:23:35-04:00</updated>

		<published>2004-05-10T15:23:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36258#p36258</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36258#p36258"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36258#p36258"><![CDATA[
Thats why I didn't reply back.<br><br>I guess, when you start fiddling with scripts<br>and get their know how, then by messing around<br>checking what kind of errors you get in the DCC<br>with the bot, you can fix them.<br><br>Some may take time, and some maybe an error<br>of syntax, very easy to fix.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon May 10, 2004 3:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-05-10T14:28:01-04:00</updated>

		<published>2004-05-10T14:28:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36257#p36257</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36257#p36257"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36257#p36257"><![CDATA[
<blockquote class="uncited"><div>#How many seconds should the bot stay gone in the cycle before rejoining the channel (in secs) <br><br>This indicates that he wants utimer and not timer!!!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Just pointing that out.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"></div></blockquote>That is for his "gonetime" variable... Which he uses a utimer...<br>For the "idletime" variable, he uses timer...<br><br>You need to read more carefully.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Mon May 10, 2004 2:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CoMMy]]></name></author>
		<updated>2004-05-10T14:06:25-04:00</updated>

		<published>2004-05-10T14:06:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36255#p36255</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36255#p36255"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36255#p36255"><![CDATA[
#How many seconds should the bot stay gone in the cycle before rejoining the channel (in secs) <br><br>This indicates that he wants utimer and not timer!!!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Just pointing that out.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3555">CoMMy</a> — Mon May 10, 2004 2:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-05-10T13:36:20-04:00</updated>

		<published>2004-05-10T13:36:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36254#p36254</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36254#p36254"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36254#p36254"><![CDATA[
Timer is a valid eggdrop Tcl command, Commy...  If he wants to use it, that is his perogative.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Mon May 10, 2004 1:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CoMMy]]></name></author>
		<updated>2004-05-10T04:56:53-04:00</updated>

		<published>2004-05-10T04:56:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36242#p36242</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36242#p36242"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36242#p36242"><![CDATA[
if {![string match *spamdetect* [timers]]} {timer $spamdet_idletime spamdetect} <br><br>Your forgetting the timer!!!<br><br>Its utimer u want! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3555">CoMMy</a> — Mon May 10, 2004 4:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-05-09T16:09:11-04:00</updated>

		<published>2004-05-09T16:09:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36234#p36234</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36234#p36234"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36234#p36234"><![CDATA[
Thanks!<br><br>Anyway, I got it working eventually.. for those of you<br>people who want the code here it is:<br><br>[quote]<br>#Set channel to activate private spam detector on<br>set spamchan "#funchat"<br><br>#How many minutes should the bot idle in channel before it parts for the cycle (in mins)<br>set spamdet_idletime "4"<br><br>#How many seconds should the bot stay gone in the cycle before rejoining the channel (in secs)<br>set spamdet_gonetime "60"<br><br><br>if {![string match *spamdetect* [timers]]} {timer $spamdet_idletime spamdetect}<br><br>proc spamdetect {} {<br>global botnick spamchan spamdet_idletime spamdet_gonetime<br> channel set $spamchan +inactive<br>  putlog "CYCLE: Cycling $spamchan to detect spammers."<br>  putlog "CYCLE: Will rejoin $spamchan after $spamdet_gonetime secs."<br> utimer $spamdet_gonetime "channel set $spamchan -inactive"<br> if {![string match *spamdetect* [timers]]} {timer $spamdet_idletime spamdetect}<br>}<br><br><br>This works, like a charm... however there is a problem<br>If you make the bot quit, while it's still in the cycle, meaning<br>the channel is inactive then, even when you restart it, it wont<br>join that channel ($spamchan) as it is +inactive.<br><br>I have to clear that and add a bind a procedure on event<br>as commy posted, to set it -inactive.<br><br>That should do it!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun May 09, 2004 4:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-05-09T12:50:41-04:00</updated>

		<published>2004-05-09T12:50:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36231#p36231</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36231#p36231"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36231#p36231"><![CDATA[
awyeah: Read doc/tcl-commands.doc , and pay attention to the bindings section.  (ie. Look at what parameters a pub bound procedure requires in it's declaration).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun May 09, 2004 12:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-05-09T12:01:46-04:00</updated>

		<published>2004-05-09T12:01:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36228#p36228</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36228#p36228"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36228#p36228"><![CDATA[
Well, thats almost the same<br>it just activates when you are<br>connecting to the server, not when<br>then tcl scripts are being loaded.<br><br>I wanted a delay in the channel cycle<br>thats all.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun May 09, 2004 12:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CoMMy]]></name></author>
		<updated>2004-05-09T11:36:09-04:00</updated>

		<published>2004-05-09T11:36:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36226#p36226</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36226#p36226"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36226#p36226"><![CDATA[
This is wrong at the beginning.<br><br>timer $rejointime cycle<br><br>Instead use this. Its much better.<br><div class="codebox"><p>Code: </p><pre><code>bind evnt - init-server Startproc Start {type} {global rejointimeutimer $rejointime cyclereturn 1 }</code></pre></div>That should fix it!!!<br><br>Plus you want seconds not Minutes! Use utimer command instead of timer.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3555">CoMMy</a> — Sun May 09, 2004 11:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-05-08T17:09:29-04:00</updated>

		<published>2004-05-08T17:09:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36212#p36212</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36212#p36212"/>
		<title type="html"><![CDATA[My channel CYCLE tcl for the bot does not seem to work!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36212#p36212"><![CDATA[
Hello I developed a small, continously channel cycler script<br>for my spam detector eggdrop bot, but I get an error.<br><br>[20:50] Tcl error [cycle]: called "cycle" with too many arguments<br><br><blockquote class="uncited"><div>#Set channel to activate private spam detector on<br>set spamchan "#chatzone"<br><br>#Set the time when the bot will leave the channel, after staying on the channel (in mins)<br>set leavetime 4<br><br>#Set the time when the bot will rejoin the channel in its cycle, after parting the channel (in secs)<br>set rejointime 90<br><br>bind pub m .cycle cycle<br>timer $rejointime cycle<br><br>proc cycle {} {<br>  global spamchan leavetime rejointime<br>  channel set $spamchan +inactive<br>  putlog "Cycling $spamchan to detect spammers, well rejoin $spamchan after $rejointime secs now."<br>  utimer $rejointime { channel set $spamchan -inactive }<br>  putlog "Rejoined $spamchan after a cycle of $rejointime secs."<br>  timer $leavetime cycle<br>}</div></blockquote>It gives me an error, saying too many arguments.<br>I don't understand what is wrong could you please help me out.<br><br>I can put<br>putserv "PART $spamchan"<br>putserv "JOIN $spamchan"<br><br>That makes it work, but the bot rejoins the second after it has parted, making it a quick cycle, one lasting 1 second or less.<br><br>Through the INACTIVE command I wanted to make a longer delay in cycle when it is parted. So spam bots don't ignore it for fast cycles, join/parts.<br><br>Please help me.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat May 08, 2004 5:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
