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

	<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>2007-08-08T05:33:48-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CyBaH]]></name></author>
		<updated>2007-08-08T05:33:48-04:00</updated>

		<published>2007-08-08T05:33:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75144#p75144</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75144#p75144"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75144#p75144"><![CDATA[
much thanks again<br><br>it works great o/<br><br>CyBaH<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9201">CyBaH</a> — Wed Aug 08, 2007 5:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CyBaH]]></name></author>
		<updated>2007-08-07T14:05:31-04:00</updated>

		<published>2007-08-07T14:05:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75134#p75134</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75134#p75134"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75134#p75134"><![CDATA[
Much thanks for the replies, i will try to implant it and see how it works<br><br>much thanks so far<br><br>CyBaH<br>HappY<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9201">CyBaH</a> — Tue Aug 07, 2007 2:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-08-07T07:25:44-04:00</updated>

		<published>2007-08-07T07:25:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75115#p75115</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75115#p75115"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75115#p75115"><![CDATA[
<blockquote class="uncited"><div>This should work also..<div class="codebox"><p>Code: </p><pre><code>#set time in seconds to wait after the user can use the command.set antiflood "10"variable floodproc {} {if {![info exists flood($chan)]} {set flood($chan) 0}if {[unixtime] - $flood($chan) &lt;= $antiflood} {return}set flood($chan) [unixtime]code here...}</code></pre></div></div></blockquote>Try to follow what your code does and see if it is what CyBaH wants.<br><br>Here's an example using user's proc:<div class="codebox"><p>Code: </p><pre><code>bind pub -|- !test test:testproc test:test {nick uhost hand channel arg} { if {![throttled $uhost:$channel 60]} {  putserv "PRIVMSG $channel : text i want to send by trigger" }}proc throttled {id time} {   global throttled   if {[info exists throttled($id)]} {      return 1   } {      set throttled($id) [utimer $time [list unset throttled($id)]]      return 0   }}</code></pre></div>This allows using !test only once every 60 seconds for user@host on every channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Aug 07, 2007 7:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BoaR]]></name></author>
		<updated>2007-08-06T22:37:44-04:00</updated>

		<published>2007-08-06T22:37:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75106#p75106</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75106#p75106"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75106#p75106"><![CDATA[
This should work also..<div class="codebox"><p>Code: </p><pre><code>#set time in seconds to wait after the user can use the command.set antiflood "10"variable floodproc {} {if {![info exists flood($chan)]} {set flood($chan) 0}if {[unixtime] - $flood($chan) &lt;= $antiflood} {return}set flood($chan) [unixtime]code here...}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9166">BoaR</a> — Mon Aug 06, 2007 10:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-08-06T18:10:47-04:00</updated>

		<published>2007-08-06T18:10:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75097#p75097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75097#p75097"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75097#p75097"><![CDATA[
<blockquote class="uncited"><div>Search the forum for the keyword 'throttled'.</div></blockquote>I think that old proc is ready for an upgrade:<div class="codebox"><p>Code: </p><pre><code>proc throttled {id time} { global throttled if {[info exists throttled($id)]} { return 1 } { set throttled($id) [utimer $time [list unset throttled($id)]]return 0 } }</code></pre></div>...making better use of the variable - That way, you can clean things up a little easier, if you ever need to:<div class="codebox"><p>Code: </p><pre><code>proc killthrottle id {global throttledif {[info exists throttled($id)]} {killutimer $throttled($id)unset throttled($id)}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Aug 06, 2007 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-08-06T17:10:45-04:00</updated>

		<published>2007-08-06T17:10:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75093#p75093</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75093#p75093"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75093#p75093"><![CDATA[
<a href="http://forum.egghelp.org/search.php" class="postlink">Search</a> the forum for the keyword 'throttled'.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Aug 06, 2007 5:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-08-06T15:33:13-04:00</updated>

		<published>2007-08-06T15:33:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75091#p75091</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75091#p75091"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75091#p75091"><![CDATA[
Simplest way, I suppose, would be to save a timestamp for the last time each user used the command. You'd probably have to use handle-names or implement some method of keeping track of who's who (nickchanges, etc).<br>As one later on triggers the command, check wether the timestamp is old enough to determine wether it should be permitted or not.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Aug 06, 2007 3:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CyBaH]]></name></author>
		<updated>2007-08-06T13:59:36-04:00</updated>

		<published>2007-08-06T13:59:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75086#p75086</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75086#p75086"/>
		<title type="html"><![CDATA[prevent public command abuse with a timer on a user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75086#p75086"><![CDATA[
Hi all, <br><br>I tried to use the search function but could not really find the right search keywords i assume.<br><br>I am having the problem that ppl are able to use a trigger(public command like !test)  at any moment.<br>I would like to let my bot look if the user allready used the !test trigger in the last for example 1 minute.<br><br>any suggestions where to search / how to add it ?<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- !test test:testproc test:test {nick uhost hand channel arg} {putserv "PRIVMSG $channel : text i want to send by trigger"}</code></pre></div>so again..bot has to remember the user allready used the trigger in the last minute.<br><br>I must say i have some tcl knowledge but this i could not find.<br><br>Thanks and i hope i wrote in the correct forum<br><br>CyBaH<br>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9201">CyBaH</a> — Mon Aug 06, 2007 1:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
