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

	<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>2002-02-25T06:53:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-02-25T06:53:00-04:00</updated>

		<published>2002-02-25T06:53:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4911#p4911</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4911#p4911"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4911#p4911"><![CDATA[
I adjusted the code. Thanks for ur help Petersen and sorry for asking too many questions.<br>I used "foreach timr [utimers]" to check for timer existance on "[lindex $timr 2]" and  kill it.<br><br>z_one<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Mon Feb 25, 2002 6:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-02-24T14:00:00-04:00</updated>

		<published>2002-02-24T14:00:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4893#p4893</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4893#p4893"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4893#p4893"><![CDATA[
I got your point. But even when I unset the timer as u proposed, I am still getting the msg "Invalid Timer ID"<br><br>All I want to do is:<br><br>1- Check if a channel specific timer exists - say it's called mytimer(#mychan)<br><br>2- If it doesn't exist then simply set it for 10 seconds to perform an action.<br><br>3- If it exists, kill it first then set it again for another 10 seconds. The reason I wanna kill it is because I don't wanna set the timer with a diff. ID everytime someone joins ... if there's a fast flood it will probably make the bot crash.<br>I just wanna kill the timer and set it again with the SAME ID for a specific channel.<br><br><br>&lt;font size=-1&gt;[ This Message was edited by: z_one on 2002-02-25 01:40 ]&lt;/font&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Sun Feb 24, 2002 2:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-02-24T12:55:00-04:00</updated>

		<published>2002-02-24T12:55:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4890#p4890</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4890#p4890"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4890#p4890"><![CDATA[
you need to unset it when the timer runs. once the timer has run, the value in that var is now an invalid timer id (as the timer doesnt exist anymore)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Sun Feb 24, 2002 12:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-02-24T07:49:00-04:00</updated>

		<published>2002-02-24T07:49:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4889#p4889</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4889#p4889"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4889#p4889"><![CDATA[
why would I wanna unset the timerID. I need to keep track of it to kill it later on<br>"killutimer $myipjointimer($chan)" before starting a new one. Otherwise, I'll end up having so many timers if I don't stop the current one before starting a new one. right ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Sun Feb 24, 2002 7:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-02-23T23:15:00-04:00</updated>

		<published>2002-02-23T23:15:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4882#p4882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4882#p4882"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4882#p4882"><![CDATA[
gonna need some unset lines<br><br>eg<br><br>set myipjointimer($chan) [utimer 10 {set ipjoinlast($chan) "" ; unset myipjointimer($chan) }] <p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Sat Feb 23, 2002 11:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-02-23T22:10:00-04:00</updated>

		<published>2002-02-23T22:10:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4880#p4880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4880#p4880"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4880#p4880"><![CDATA[
lol well I hope you're not drunk this time <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br>I declared myipjointimer as a global variable.<br>and I even tried to compile with (and without) the following line.<br><blockquote class="uncited"><div>  if {![info exists myipjointimer($chan)]} {set myipjointimer($chan) ""}</div></blockquote><br>I get an error in both cases (with and without it) when it gets to the line <br><blockquote class="uncited"><div>if {[info exists myipjointimer($chan)]} { killutimer $myipjointimer($chan) }<br>set myipjointimer($chan) [utimer 10 {set ipjoinlast($chan) ""}]</div></blockquote>I get the following error msg:<br>Invalid TimerID<br><br>Any ideas why ? and how to make channel  specific timers work ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Sat Feb 23, 2002 10:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-02-23T21:34:00-04:00</updated>

		<published>2002-02-23T21:34:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4879#p4879</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4879#p4879"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4879#p4879"><![CDATA[
thats what i get for coding when drunk with no testing <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":razz:" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Sat Feb 23, 2002 9:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-02-23T21:18:00-04:00</updated>

		<published>2002-02-23T21:18:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4878#p4878</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4878#p4878"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4878#p4878"><![CDATA[
Thx dude I owe u one. By the way, in the code u added, there's a missing closing bracket within the if statement in the line (and others like it):<br><blockquote class="uncited"><div>if {![info exists nickjointimes($chan)} { <br>set nickjointimes($chan) 0 <br>} </div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Sat Feb 23, 2002 9:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-02-21T12:52:00-04:00</updated>

		<published>2002-02-21T12:52:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4791#p4791</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4791#p4791"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4791#p4791"><![CDATA[
yes, arrays and channel specific timers are the way<br><blockquote class="uncited"><div>set nickjoinlast() "" <br>set nickjointimes() "" <br>set nickjoinsafe() "" <br><br>bind join - * nickjoin <br><br>proc nickjoin {nick uhost hand chan} { <br>global nickjoinlast nickjointimes nickjoinsafe mynickjointimer<br><br>if {![info exists nickjointimes($chan)} {<br>set nickjointimes($chan) 0<br>}<br><br>if {![info exists nickjoinsafe($chan)} {<br>set nickjoinsafe($chan) 0<br>}<br><br><br><br>if {$nickjoinlast($chan) != ""} { <br>if {"$nickjoinlast($chan)" == "$nick"} { <br>if {$nickjointimes($chan) &gt;= 3} { <br>if {$nickjoinsafe($chan) == 0} { <br>putquick "MODE $chan +b $nick!*@*" -next <br>set nickjoinsafe($chan) 1 <br>utimer 20 {set nickjoinsafe($chan) 0} <br>} <br>} else { <br>set nickjointimes($chan) [expr $nickjointimes($chan) + 1] <br>} <br>} else { <br>set nickjoinlast($chan) $nick <br>if ([info exists mynickjointimer($chan)]) { killutimer $mynickjointimer($chan) } <br>set mynickjointimer($chan) [utimer 10 {set nickjoinlast($chan) ""}] <br>set nickjointimes($chan) 1 <br>} <br>} else { <br>set nickjoinlast($chan) $nick <br>if ([info exists mynickjointimer($chan)]) { killutimer $mynickjointimer($chan) } <br>set mynickjointimer($chan) [utimer 10 {set nickjoinlast($chan) ""}] <br>} <br><br>} </div></blockquote>note that this is a direct port - i made no effort to fix some of the crap code (except I declared mynickjointimer globally as it should have been)<br><br>[edit]<br>typo fix<br>[/edit]<br><br>&lt;font size=-1&gt;[ This Message was edited by: Petersen on 2002-02-21 09:53 ]&lt;/font&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Thu Feb 21, 2002 12:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-02-21T10:16:00-04:00</updated>

		<published>2002-02-21T10:16:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4764#p4764</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4764#p4764"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4764#p4764"><![CDATA[
Can anyone help guys. I really and urgently need this code to work when the eggdrop is op on multiple channels (I tried using arrays for variable and timer names to make them channel specific, didn't work).<br><br>Slennox, Egghead, Petersen, Ppslim or anyone else out there ?<br><br>Thanks in advance<br><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Thu Feb 21, 2002 10:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2002-02-19T09:34:00-04:00</updated>

		<published>2002-02-19T09:34:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4693#p4693</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4693#p4693"/>
		<title type="html"><![CDATA[Help with code adjustements]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4693#p4693"><![CDATA[
Hi guys,<br><br>  Can anyone convert this code to make it work even if my eggdrop is op on many channels.<br>  The code works fine now because my eggie is op on just 1 channel, but I want to op it on many. If I use the current code and the same nick join 2 different channels, it will trigger a ban which is wrong.<br><br> Here's the code:<br><blockquote class="uncited"><div>set nickjoinlast ""<br>set nickjointimes 0<br>set nickjoinsafe 0<br><br>bind join - * nickjoin<br><br>proc nickjoin {nick uhost hand chan} {<br>  global nickjoinlast nickjointimes nickjoinsafe<br><br><br>  if {$nickjoinlast != ""} {<br>    if {"$nickjoinlast" == "$nick"} {<br>      if {$nickjointimes &gt;= 3} {<br>        if {$nickjoinsafe == 0} {<br>          putquick "MODE $chan +b $nick!*@*" -next<br>          set nickjoinsafe 1<br>          utimer 20 {set nickjoinsafe 0}<br>        }<br>      } else {<br>        set nickjointimes [expr $nickjointimes + 1]<br>      }<br>    } else {<br>      set nickjoinlast $nick<br>      if ([info exists mynickjointimer]) { killutimer $mynickjointimer }<br>      set mynickjointimer [utimer 10 {set nickjoinlast ""}]<br>      set nickjointimes 1<br>    }<br>  } else {<br>    set nickjoinlast $nick<br>    if ([info exists mynickjointimer]) { killutimer $mynickjointimer }<br>    set mynickjointimer [utimer 10 {set nickjoinlast ""}]<br>  }<br><br>}</div></blockquote>&lt;font size=-1&gt;[ This Message was edited by: z_one on 2002-02-19 06:38 ]&lt;/font&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Tue Feb 19, 2002 9:34 am</p><hr />
]]></content>
	</entry>
	</feed>
