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

	<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>2010-03-10T04:47:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Elfriede]]></name></author>
		<updated>2010-03-10T04:47:03-04:00</updated>

		<published>2010-03-10T04:47:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92454#p92454</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92454#p92454"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92454#p92454"><![CDATA[
Many thanks - got it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9204">Elfriede</a> — Wed Mar 10, 2010 4:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-03-09T21:45:35-04:00</updated>

		<published>2010-03-09T21:45:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92451#p92451</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92451#p92451"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92451#p92451"><![CDATA[
@Elfriede:<br>Assuming you are using the throttled proc from the previous posts, that shouldn't be too hard. First get the timestamp stored in ::throttled(<em class="text-italics">id</em>), where <em class="text-italics">id</em> is the unique identifier (in your case $host,$chan). Next get the current timestamp using <strong class="text-strong">clock seconds</strong>. Finally do some simple maths - subtract the old timestamp from the current, and you should get a rough estimate on how long your user needs to wait.<br><div class="codebox"><p>Code: </p><pre><code>...  if {[throttled $host,$chan 10]} {    #then is $::throttled($host,$chan)    #now is [clock seconds]    #time remaining is now - then -&gt; [expr [clock seconds] - $::throttled($host,$chan)]    puthelp "PRIVMSG $chan : Flood control - Retry in [expr [clock seconds] - $::throttled($host,$chan)] seconds"  } else {...</code></pre></div>Another way of doing it would be to fetch the list of currently running timers (using the utimers command), search for the timer that's supposed to unset ::throttled(id), and fetch the remaining counter..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Mar 09, 2010 9:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-03-09T20:38:37-04:00</updated>

		<published>2010-03-09T20:38:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92450#p92450</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92450#p92450"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92450#p92450"><![CDATA[
<blockquote class="uncited"><div>   if {[throttled $host,$chan 10]} { </div></blockquote> 10 seconds maybe?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Tue Mar 09, 2010 8:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Elfriede]]></name></author>
		<updated>2010-03-09T17:07:54-04:00</updated>

		<published>2010-03-09T17:07:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92449#p92449</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92449#p92449"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92449#p92449"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc pub:brak {nick uhost hand chan text} {  global brak   set host [lindex [split $uhost @] 1]   if {[throttled $host,$chan 10]} {putserv "PRIVMSG $chan : Flood Control - Retry in xx Seconds"    } else {    puthelp "PRIVMSG $chan :[lindex $brak [rand [llength $brak]]]"    return 1   } } </code></pre></div>Can someone please add how much time left, till cmd is again possible ?  Thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9204">Elfriede</a> — Tue Mar 09, 2010 5:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mojado]]></name></author>
		<updated>2010-01-12T14:24:25-04:00</updated>

		<published>2010-01-12T14:24:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91657#p91657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91657#p91657"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91657#p91657"><![CDATA[
U ar awesome.<br>My script works fine again!!<br><br>Many thanxs TCL.<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9563">mojado</a> — Tue Jan 12, 2010 2:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-01-07T02:16:06-04:00</updated>

		<published>2010-01-07T02:16:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91614#p91614</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91614#p91614"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91614#p91614"><![CDATA[
I lowered the throttled time as well, so they only have to wait 10 seconds before they can use the !brak again <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code># brak Quotes 1.0 by maximopc. 29/08/09## bind pub -|- !brak pub:brak proc pub:brak {nick uhost hand chan text} {  global brak   set host [lindex [split $uhost @] 1]   if {[throttled $host,$chan 10]} {     return 0   } else {    puthelp "PRIVMSG $chan :[lindex $brak [rand [llength $brak]]]"    return 1   } }proc throttled {id time} {   global throttled   if {[info exists throttled($id)]} {      return 1   } {      set throttled($id) [clock sec]      utimer $time [list unset throttled($id)]      return 0   }}set brak {"\"cuando algo ilegal se hace publico se transforma automaticamente en virus, aunque no los sea, Hay muchos programas que no son virus, sin embargo, como son maliciosos, les ponen la caratula de troyano.\"""\"esas cosas apenas las llega a las manos de lamers, lo meten en virustotal. y cagó.\"""\"niños, cuando ustedes hacen un troyano, y agarra alguien y se da cuenta que es un troyano, y le rompe las bolas agarra el archivo. Lo comprime pone examiniar (similar a tinypic para que entiendan) y de ahí se fijan expertos, y si es le hacen un HASH o MD5 y se carga como virus en la mayoria de los antivirus.\"""\"na, todo pasado.. troyano prestado.. muy lamer el asunto.. me fuí.\"""\"cojanse una mina hagan algo loco, dejense de games.\"""\"cuando tenía tu edad Cry_Wolf^Aw en esta epoca andaba en pedo metido en una carpa con 5 minas.\"""\"pequeña matraca le estoy dando a la impresora, hasta que no queme el cartucho no paro.\"""\"estoy registrado en cualquier server.\"""\"anda muy tranquilo ColiFa, que te pasa andas turvado?.\"""\"si tienen vehiculo gasolero o naftero.. llenen el tanque.\"""\"yo si no se algo, digo.. [bueno no lo se], no digo que me comió la tarea el perro.\"""\"no SrWeT lo mio es el cracking.\"""\"haganlé una vaquita para la silicona.\""}putlog "brak Quotes 1.0 by maximopc loaded ..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Thu Jan 07, 2010 2:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mojado]]></name></author>
		<updated>2010-01-05T13:01:32-04:00</updated>

		<published>2010-01-05T13:01:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91585#p91585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91585#p91585"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91585#p91585"><![CDATA[
Many thanxs for your help TCL_no_TK... but this tcl doesn´t work anymore. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> <br><br>So weird. It´s loaded, but when type !brak in channel not work.<br><br>BTW, thanxs. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><div class="codebox"><p>Code: </p><pre><code># brak Quotes 1.0 by maximopc. 29/08/09##bind pub - !chuck pub_brakproc pub_brak {nick mask hand channel args} {   global brak   puthelp "PRIVMSG $channel :[lindex $brak [rand [llength $brak]]]"   }bind pub -|- !brak pub:brak proc pub:brak {nick host hand chan text} {  global brak   if {[throttled $u,$c 30]} {     return 0   } else {    puthelp "PRIVMSG $chan :[lindex $brak [rand [llength $brak]]]"    return 1   } }proc throttled {id time} {   global throttled   if {[info exists throttled($id)]} {      return 1   } {      set throttled($id) [clock sec]      utimer $time [list unset throttled($id)]      return 0   }}set brak {"\"cuando algo ilegal se hace publico se transforma automaticamente en virus, aunque no los sea, Hay muchos programas que no son virus, sin embargo, como son maliciosos, les ponen la caratula de troyano.\"""\"esas cosas apenas las llega a las manos de lamers, lo meten en virustotal. y cagó.\"""\"niños, cuando ustedes hacen un troyano, y agarra alguien y se da cuenta que es un troyano, y le rompe las bolas agarra el archivo. Lo comprime pone examiniar (similar a tinypic para que entiendan) y de ahí se fijan expertos, y si es le hacen un HASH o MD5 y se carga como virus en la mayoria de los antivirus.\"""\"na, todo pasado.. troyano prestado.. muy lamer el asunto.. me fuí.\""}putlog "brak Quotes 1.0 by maximopc loaded ..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9563">mojado</a> — Tue Jan 05, 2010 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-01-05T01:57:20-04:00</updated>

		<published>2010-01-05T01:57:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91575#p91575</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91575#p91575"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91575#p91575"><![CDATA[
its ok, great try <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <div class="codebox"><p>Code: </p><pre><code> bind pub -|- !brak pub:brak proc pub:brak {nick host hand chan text} {  global brak   if {[throttled $u,$c 30]} {     return 0   } else {    puthelp "PRIVMSG $chan :[lindex $brak [rand [llength $brak]]]"    return 1   } }proc throttled {id time} {   global throttled   if {[info exists throttled($id)]} {      return 1   } {      set throttled($id) [clock sec]      utimer $time [list unset throttled($id)]      return 0   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Tue Jan 05, 2010 1:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mojado]]></name></author>
		<updated>2010-01-04T21:52:36-04:00</updated>

		<published>2010-01-04T21:52:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91571#p91571</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91571#p91571"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91571#p91571"><![CDATA[
Thanxs for reply.... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>The .tcl looks like this?<br><div class="codebox"><p>Code: </p><pre><code># brak Quotes 1.0 by maximopc. 29/08/09##bind pub - !brak pub_brakproc pub_brak {nick mask hand channel args} {   global brak   puthelp "PRIVMSG $channel :[lindex $brak [rand [llength $brak]]]"   }bind pub n !brak pub:brakproc pub:brak {n u h c a} {   if {[throttled $u,$c 30]} {      puthelp "PRIVMSG $c :$n: denied. (wait or try a different channel)"   } else {      puthelp "PRIVMSG $c :$n: allowed (wait 30 seconds)"   }}</code></pre></div>Sorry for ask... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br>Regards.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9563">mojado</a> — Mon Jan 04, 2010 9:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2009-12-18T17:39:13-04:00</updated>

		<published>2009-12-18T17:39:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91372#p91372</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91372#p91372"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91372#p91372"><![CDATA[
See <a href="http://forum.egghelp.org/viewtopic.php?p=45537#45537" class="postlink">this post</a> on how to include a "throttle" type system in to the script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Fri Dec 18, 2009 5:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mojado]]></name></author>
		<updated>2010-01-12T14:24:41-04:00</updated>

		<published>2009-12-17T11:37:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91366#p91366</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91366#p91366"/>
		<title type="html"><![CDATA[how to set flood control in this script? [[SOLVED]]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91366#p91366"><![CDATA[
Hi everyone, I have a litle doubt...how to set flood control in this tcl??<br><br><strong class="text-strong">brak.tcl</strong><br><div class="codebox"><p>Code: </p><pre><code># brak Quotes 1.0 by maximopc. 29/08/09##bind pub - !brak pub_brakproc pub_brak {nick mask hand channel args} {   global brak   puthelp "PRIVMSG $channel :[lindex $brak [rand [llength $brak]]]"   }set brak {"\"cuando algo ilegal se hace publico se transforma automaticamente en virus, aunque no los sea, Hay muchos programas que no son virus, sin embargo, como son maliciosos, les ponen la caratula de troyano.\"""\"esas cosas apenas las llega a las manos de lamers, lo meten en virustotal. y cagó.\"""\"niños, cuando ustedes hacen un troyano, y agarra alguien y se da cuenta que es un troyano, y le rompe las bolas agarra el archivo. Lo comprime pone examiniar (similar a tinypic para que entiendan) y de ahí se fijan expertos, y si es le hacen un HASH o MD5 y se carga como virus en la mayoria de los antivirus.\"""\"na, todo pasado.. troyano prestado.. muy lamer el asunto.. me fuí.\"""\"cojanse una mina hagan algo loco, dejense de games.\"""\"cuando tenía tu edad Cry_Wolf^Aw en esta epoca andaba en pedo metido en una carpa con 5 minas.\"""\"pequeña matraca le estoy dando a la impresora, hasta que no queme el cartucho no paro.\"""\"estoy registrado en cualquier server.\"""\"anda muy tranquilo ColiFa, que te pasa andas turvado?.\"""\"si tienen vehiculo gasolero o naftero.. llenen el tanque.\"""\"yo si no se algo, digo.. [bueno no lo se], no digo que me comió la tarea el perro.\"""\"no SrWeT lo mio es el cracking.\"""\"haganlé una vaquita para la silicona.\""}putlog "brak Quotes 1.0 by maximopc loaded ..."</code></pre></div><strong class="text-strong">I like something llike this......</strong><br><div class="codebox"><p>Code: </p><pre><code>#### FLOOD CONTROL    # Antiflood (0 = off, 1 = on)  variable antiflood 1  # Individual antiflood control  # "6:30" = maximum 6 commands per 30 seconds; following ones will be ignored.  variable cmdflood_addquote "3:80"  variable cmdflood_quote "5:80"  variable cmdflood_quoteinfo "5:80"  variable cmdflood_delquote "2:60"  variable cmdflood_randquote "5:80"  variable cmdflood_lastquote "2:60"  variable cmdflood_findquote "3:80"  # global antiflood control (all commands)  # please note : for the maximum allowed number of commands, make sure the  #               value is greater than the greatest value defined for  #               the individual antiflood control settings.  variable cmdflood_global "10:120"  # Minimum time interval between 2 warning messages from the antiflood.  # Do not set that value too low or you will be flooded by antiflood warnings ;)  variable antiflood_msg_interval 20</code></pre></div>Thanxs in advance people. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink">  <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=9563">mojado</a> — Thu Dec 17, 2009 11:37 am</p><hr />
]]></content>
	</entry>
	</feed>
