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

	<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-01-25T20:58:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[willienl]]></name></author>
		<updated>2005-01-25T20:58:46-04:00</updated>

		<published>2005-01-25T20:58:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45823#p45823</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45823#p45823"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45823#p45823"><![CDATA[
first trigger start timer unset afther 10min<br>when triggers again reset timer to 10min again<br>when trigger 3th time unset timer<br>thats ok i go test now<br>But the biggy problem is as simple<br>what shuld be reset ?<br>if nick1 get kick't 2 times <br>and nick 2 get kickts 3 times it don't forget nick1 is still kick't 2 times<br>that ok just how i want it<br>10 minutes later is the trigger kc($n)<br>kc(lastkicknick) or do i misunderstand ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5871">willienl</a> — Tue Jan 25, 2005 8:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2005-01-25T08:48:07-04:00</updated>

		<published>2005-01-25T08:48:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45815#p45815</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45815#p45815"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45815#p45815"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc checkkc n {   if {[info exists ::kc($n)]} {     unset ::kc($n)  } { putlog "dontexist: shouldnt happen" }}proc checkt { n w } {  foreach t [timers] {    if {[string equal [lindex [lindex $t 1] 0] "checkkc"] &amp;&amp; [string equal [lindex [lindex $t 1] 1] $n]} {       killtimer [lindex $t 2]      if {$w == "restart"} { timer 10 [list checkkc $n] }    }  }}bind pub - "!test" pub:kctest proc pub:kctest {nick uhost hand channel arg} {   global kc  if ![info exists kc([set n [string tolower $nick]])] {     set kc($n) 1    timer 10 [list checkkc $n]    putquick "PRIVMSG $channel :$nick this is kick $kc($n)"  } elseif { $kc($n) == 2 } {      incr kc($n)      putquick "PRIVMSG $channel :$nick this is kick $kc($n) banned now"       checkt $n kill      unset kc($n)  } else {       checkt $n restart      incr kc($n)       putquick "PRIVMSG $channel :$nick this is kick $kc($n)"  }   return 0 }</code></pre></div>maybe i misunderstood you, but anyhow, this is what the above does:<br><br>starts 10min unset timer when first triggered<br>restarts 10min unset timer on 2nd trigger<br>kills timer and unsets kc($n) on 3rd trigger.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Tue Jan 25, 2005 8:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willienl]]></name></author>
		<updated>2005-01-24T21:09:30-04:00</updated>

		<published>2005-01-24T21:09:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45804#p45804</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45804#p45804"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45804#p45804"><![CDATA[
i know it do not auto reset<br>it reset when eggdrop reset`s but the kick counter data<br>is only for temp use<br>other question about this script<br><br>i have try to make the counter reset afther 1 min (for debug 1 min when work 10min)<br>with the timer command but the problem is when it triggers there is an nick name <br>so $n is not empty<br>afther 10 min is an difrent story how to reset the counter for that one set xx time ago not all counters<br><div class="codebox"><p>Code: </p><pre><code>bind pub - "!test" pub:kctest proc pub:kctest {nick uhost hand channel arg} {   global kc   if ![info exists kc([set n [string tolower $nick]])] {    set kc($n) 1    putquick "PRIVMSG $channel :$nick  test $kc($n) "    timer 1 { unset kc($n) }  } elseif { $kc($n) == 2 } {    incr kc($n)     putquick "PRIVMSG $channel :$nick 3 test $kc($n) "    unset kc($n)   } else {    incr kc($n)     putquick "PRIVMSG $channel :$nick  test $kc($n) "    timer 1 { unset kc($n) }  }   return 0 } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5871">willienl</a> — Mon Jan 24, 2005 9:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-01-24T17:50:00-04:00</updated>

		<published>2005-01-24T17:50:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45800#p45800</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45800#p45800"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45800#p45800"><![CDATA[
awyeah : an array won't reset to 0 upon a restart. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jan 24, 2005 5:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willienl]]></name></author>
		<updated>2005-01-24T16:34:22-04:00</updated>

		<published>2005-01-24T16:34:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45797#p45797</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45797#p45797"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45797#p45797"><![CDATA[
thats no problem<br>it must reset the counter for an user afther 10 min<br>and not use mutch resources<br>only fix an auto reset timer and done<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5871">willienl</a> — Mon Jan 24, 2005 4:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-01-23T20:50:24-04:00</updated>

		<published>2005-01-23T20:50:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45755#p45755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45755#p45755"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45755#p45755"><![CDATA[
Yep, but if you restart your bot, the counter will start from 0 again. If you want to avoid that save the integer into a file (write it) then read it everytime from the file you have saved it in.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Jan 23, 2005 8:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willienl]]></name></author>
		<updated>2005-01-23T16:36:51-04:00</updated>

		<published>2005-01-23T16:36:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45737#p45737</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45737#p45737"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45737#p45737"><![CDATA[
Thnx a lot i go test now looks ok<br>i whas try to do in in an temp array<br>but din't work yet do some wrong in the array function and not shure<br>if it do how i like  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>****EDIT******<br>thnx thnx thnx  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br>it works great<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5871">willienl</a> — Sun Jan 23, 2005 4:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2005-01-23T16:32:46-04:00</updated>

		<published>2005-01-23T16:32:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45736#p45736</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45736#p45736"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45736#p45736"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - "!test" pub:kctest proc pub:kctest {nick uhost hand channel arg} {   global kc  if ![info exists kc([set n [string tolower $nick]])] {     set kc($n) 1    putquick "PRIVMSG $channel :$nick this is kick $kc($n)"  } elseif { $kc($n) == 2 } {      incr kc($n)      putquick "PRIVMSG $channel :$nick this is kick $kc($n) banned now"       unset kc($n)  } else {       incr kc($n)       putquick "PRIVMSG $channel :$nick this is kick $kc($n)"  }   return 0 }</code></pre></div>should work (didnt test)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Sun Jan 23, 2005 4:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willienl]]></name></author>
		<updated>2005-01-23T13:18:04-04:00</updated>

		<published>2005-01-23T13:18:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45733#p45733</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45733#p45733"/>
		<title type="html"><![CDATA[need an kick counter for some 3x kick is ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45733#p45733"><![CDATA[
Hi there<br>i have some simple kick counter it count all <br>i use !test for testing it <br>set kc 0 is for made var kc <br>must make if exist of it<br>but when some one type !test is say kick 1<br>when some other do it say kick 2 <br>i want this for each user difrent<br>so i can use this in my bot for count kick`s each user <br>without an sql or other db inplemention like write to file must be in cache <br>to reduce mem and cpu use and let it respond faster it is <br>already use an file db for chekking user host`s and i don't wana check 2<br>file db`s that go take time to mutch time <br>how can i do this it is an normal routine for mirc script to use tables<br>and i se no option to do this in tcl<br>this way incr var don't work good it count global and not kick`s per nick<br><br><div class="codebox"><p>Code: </p><pre><code>set kc 0bind pub - "!test" pub:kctestproc pub:kctest {nick uhost hand channel arg} {if {$nick == "3" } {putquick "PRIVMSG $channel : $nick this is kick $kc banned now"set kc 0 } else {incr kcputquick "PRIVMSG $channel : $nick this is kick $nick "} return 0</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5871">willienl</a> — Sun Jan 23, 2005 1:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
