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

	<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>2022-09-28T14:53:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-09-28T14:53:46-04:00</updated>

		<published>2022-09-28T14:53:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111436#p111436</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111436#p111436"/>
		<title type="html"><![CDATA[waiting time for public command reverse counting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111436#p111436"><![CDATA[
thank you CrazyCat i tried it this way would this be a proper way to clear the variable after the the threshold has been reached ?<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- !wait pub:testwaitingtimeproc pub:testwaitingtime {nick uhost hand chan text} { global last_used if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { return 0 } if {[info exists last_used($nick!$uhost)]} {    if {[clock seconds] - $last_used($nick!$uhost) &lt; 60*1*1 } {        set calctime [duration [expr {60*1*1 - ([clock seconds] - $last_used($nick!$uhost))}]]        set calctime2 [expr {60*1*1 - ([clock seconds] - $last_used($nick!$uhost))}]       putserv "notice $nick :$uhost you cant because you need to wait $calctime"        if {$calctime2 &lt; 2} { array unset last_used($nick!$uhost) }        return    }      } set last_used($nick!$uhost) [clock seconds]    putserv "privmsg $chan checked!!!!!!!"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 28, 2022 2:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-09-28T14:07:06-04:00</updated>

		<published>2022-09-28T14:07:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111435#p111435</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111435#p111435"/>
		<title type="html"><![CDATA[waiting time for public command reverse counting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111435#p111435"><![CDATA[
I think you play with tcl since enough time to be able to read and understand the code, and what it does or does not.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Sep 28, 2022 2:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-09-28T11:53:23-04:00</updated>

		<published>2022-09-28T11:53:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111434#p111434</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111434#p111434"/>
		<title type="html"><![CDATA[waiting time for public command reverse counting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111434#p111434"><![CDATA[
would the variable needs to  be unset after threshold has been reached or is that cleared by eggdrop  ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 28, 2022 11:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-09-28T10:23:36-04:00</updated>

		<published>2022-09-28T10:23:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111433#p111433</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111433#p111433"/>
		<title type="html"><![CDATA[waiting time for public command reverse counting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111433#p111433"><![CDATA[
excellent thanks  CrazyCat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 28, 2022 10:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-09-28T10:09:43-04:00</updated>

		<published>2022-09-28T10:09:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111432#p111432</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111432#p111432"/>
		<title type="html"><![CDATA[waiting time for public command reverse counting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111432#p111432"><![CDATA[
This is simple mathematics.<br>If you want remaining time, just substract $duration from your delay:<div class="codebox"><p>Code: </p><pre><code>set calctime [duration [expr {60 - ([clock seconds] - $last_used($nick!$uhost))}]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Sep 28, 2022 10:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-09-28T09:34:08-04:00</updated>

		<published>2022-09-28T09:34:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111431#p111431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111431#p111431"/>
		<title type="html"><![CDATA[waiting time for public command reverse counting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111431#p111431"><![CDATA[
greetingz gentz,<br><br>i was trying out this small  code to count time remaining before able to use a public command again i found here : <br><br><a href="https://stackoverflow.com/questions/14087207/tcl-wait-time-in-countdown" class="postlink">https://stackoverflow.com/questions/140 ... -countdown</a><br><br>i came up with this: <div class="codebox"><p>Code: </p><pre><code>bind pub -|- !rdigits pub:testwaitproc pub:testwait {nick uhost hand chan text} { global last_used  if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr $hand o|o $chan]} { return 0 } if {[info exists last_used($nick!$uhost)]} {    if {[clock seconds] - $last_used($nick!$uhost) &lt; 60*1*1 } {        set calctime [duration [expr {[clock seconds] - $last_used($nick!$uhost)}]]       putserv "notice $nick :$uhost you cant because you need to wait $calctime"        return    }}  set last_used($nick!$uhost) [clock seconds]    putserv "privmsg $chan checked!!!!!!!"}</code></pre></div><br>so instead of output  the remaining time to wait it seems to output the time that has been waited<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 28, 2022 9:34 am</p><hr />
]]></content>
	</entry>
	</feed>
