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

	<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-03-08T21:40:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-03-08T21:40:59-04:00</updated>

		<published>2005-03-08T21:40:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47379#p47379</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47379#p47379"/>
		<title type="html"><![CDATA[Help me with this code :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47379#p47379"><![CDATA[
I am aware that all channel records will be deleted, as it harsh to add and remove channels so frequently. But you can specify parameters and options after "channel add" in the code and it will go ahead and set it to them. But adding them everytime would seem useless and disturbing.<br><br>Actually I mentioned +inactive if you read all of my post, (I use it). Inactive makes the bot part the channel, hence being inactive on it. You can first part the bot with putserv and +inactive the channel immediately. Then whenever you feel like -inactive on the channel and woolah, it joins back in immediately.<br><div class="codebox"><p>Code: </p><pre><code>timer 5 channel:cycleproc channel:cycle {} {  foreach c [channels] {  putserv "part $c :A verificar existência de publicidade/spam"  channel set $c +inactive  timer 1 "channel set $c -inactive"  } timer 5 channel:cycle} </code></pre></div>You could also go ahead and check for if timer exists, to make it better... like I have. And one thing more. Bind on rehash, and on-connect in evnt and make it set all channels -inactive via foreach [channels]. Because sometime when the bot is in the middle of a cycle and you restart, rehash channels set to -inactive will remain as they are for a double cycle. And putserv part would be parting the bot from a non-existant channel then.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Mar 08, 2005 9:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-03-08T21:08:29-04:00</updated>

		<published>2005-03-08T21:08:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47376#p47376</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47376#p47376"/>
		<title type="html"><![CDATA[Help me with this code :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47376#p47376"><![CDATA[
Something like this is more easier:<br><div class="codebox"><p>Code: </p><pre><code>timer 5 channel:cycleproc channel:cycle {} {  foreach c [channels] {  putserv "part $c :A verificar existência de publicidade/spam"  channel remove $c  timer 1 "channel add $c"  } timer 5 channel:cycle}</code></pre></div>Here I've set the cycle delay, stay in the channel every 5 minutes and cycle it after every 5 minutes for 1 minute only and rejoin. This is basic.<br><br>I basically use +inactive and -inactive, which is better than adding and deleting the channel again and again, but you want to specify a message on part so, I guess this can do it as well.<br><div class="codebox"><p>Code: </p><pre><code>putserv "part $c :A verificar existência de publicidade/spam"putserv "join $c"</code></pre></div>This code will produce very rapid cycles as MeTroiD explained. You can force an eggdrop to part a channel manually, but when that channel is added to the dynamic channel list, then it executes a timer checking if the bot is on the channel or not? if not, go ahead and join it. (possible reasons could be its banned from the channel, unable to join and so...)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Mar 08, 2005 9:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-03-08T20:13:39-04:00</updated>

		<published>2005-03-08T20:13:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47373#p47373</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47373#p47373"/>
		<title type="html"><![CDATA[Re: Help me with this code :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47373#p47373"><![CDATA[
<blockquote class="uncited"><div>bind time - "* * * * *" jp</div></blockquote>tried to change to this?<div class="codebox"><p>Code: </p><pre><code>bind time - "?0*" jpbind time - "?5*" jp</code></pre></div>you can remove the whole clock/ctime code then. if you want to do it with 1 bind, then check for [regexp {(0|5).} $1] (no garantie for the regualr expression ^^) or check if [expr fmod($1, 5)] or [expr fmod($1, 10)] is zero within the proc. all 3 soltions are 1000% better than saving the time and triing to figure out if 5min has passed <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=2382">De Kus</a> — Tue Mar 08, 2005 8:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-03-08T16:45:47-04:00</updated>

		<published>2005-03-08T16:45:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47367#p47367</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47367#p47367"/>
		<title type="html"><![CDATA[Help me with this code :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47367#p47367"><![CDATA[
If your on Quakenet or undernet, there is a big chance the channel might have +u which hides part messages.<br><br>Also, there is no need to make it join again, and eggdrop should automaticly rejoin a channel unless a channel is removed by channel remove.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Tue Mar 08, 2005 4:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-03-08T10:26:54-04:00</updated>

		<published>2005-03-08T10:26:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47355#p47355</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47355#p47355"/>
		<title type="html"><![CDATA[Help me with this code :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47355#p47355"><![CDATA[
maybe the irc doesn't support it<br><br>could you maybe make it more clear what this bot is supposed to do.. cause it seems a bit weird to me..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Mar 08, 2005 10:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jsilvestre]]></name></author>
		<updated>2005-03-08T06:43:27-04:00</updated>

		<published>2005-03-08T06:43:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47351#p47351</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47351#p47351"/>
		<title type="html"><![CDATA[Help me with this code :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47351#p47351"><![CDATA[
<blockquote class="uncited"><div>set jp(time) 5<br>bind time - "* * * * *" jp<br>proc jp {1 2 3 4 5} {global jp;set ctime [clock seconds]<br>    if {![info exists jp(ctime)]} {set jp(ctime) $ctime} else {<br>        if {[expr ($ctime - $jp(time)) / 60]&gt;="$jp(time)"} {<br>            set jp(ctime) $ctime<br>            foreach c [channels] {putserv "part $c :A verificar existência de publicidade/spam";putserv "join $c"}<br>        }<br>    }<br>}</div></blockquote>What´s wrong with this code? The eggdrop dont say message when he part channel and part channel every 1 minute <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral"><br><br>I wait for sugestions <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6034">jsilvestre</a> — Tue Mar 08, 2005 6:43 am</p><hr />
]]></content>
	</entry>
	</feed>
