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

	<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>2011-02-10T09:05:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[padyo]]></name></author>
		<updated>2011-02-10T09:05:04-04:00</updated>

		<published>2011-02-10T09:05:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96001#p96001</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96001#p96001"/>
		<title type="html"><![CDATA[Throttling]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96001#p96001"><![CDATA[
Cheers!  Appreciate it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10018">padyo</a> — Thu Feb 10, 2011 9:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2011-02-09T02:45:20-04:00</updated>

		<published>2011-02-09T02:45:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95988#p95988</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95988#p95988"/>
		<title type="html"><![CDATA[Throttling]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95988#p95988"><![CDATA[
Just add it to this proc <div class="codebox"><p>Code: </p><pre><code>proc pDailySchedule {dayname nick uhost hand chan text} {    if {[file exists ${dayname}.txt]} { </code></pre></div> like so <div class="codebox"><p>Code: </p><pre><code>proc pDailySchedule {dayname nick uhost hand chan text} {    if {[throttled $uhost,$chan 10]} {     putlog "* throttled: waiting 10 seconds.... (public command: !$dayname)"     return    }    if {[file exists ${dayname}.txt]} { </code></pre></div> <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=8130">TCL_no_TK</a> — Wed Feb 09, 2011 2:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[padyo]]></name></author>
		<updated>2011-02-06T13:31:08-04:00</updated>

		<published>2011-02-06T13:31:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95961#p95961</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95961#p95961"/>
		<title type="html"><![CDATA[Throttling]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95961#p95961"><![CDATA[
I've read may of the topics concerning throttling<br><div class="codebox"><p>Code: </p><pre><code>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>and I can apply it to more basic commands, but am unsure of where to place this part of the code within the following....<br><br> if {[throttled $host,$chan 10]} {<br>   return 0<br> } else {<br><blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>foreach dayname {sunday monday tuesday wednesday thursday friday saturday} {    bind PUB - !$dayname [list pDailySchedule $dayname]}proc pDailySchedule {dayname nick uhost hand chan text} {    if {[file exists ${dayname}.txt]} {        set id [open ${dayname}.txt r]        set schedule [split [read -nonewline $id] \n]        close $id        if {[llength $schedule] != 0} {            putserv "PRIVMSG $chan :Schedule for [string totitle $dayname]"            foreach item $schedule {                putserv "PRIVMSG $chan :$item"            }        } else {putserv "PRIVMSG $chan :There are no scheduled events for [string totitle $dayname]"}    } else {putserv "PRIVMSG $chan :Missing file ${dayname}.txt"}    return 0}</code></pre></div></div></blockquote>If someone could give me a heads up, it would be appreciated <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=10018">padyo</a> — Sun Feb 06, 2011 1:31 pm</p><hr />
]]></content>
	</entry>
	</feed>
