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

	<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>2004-12-24T02:42:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2004-12-24T02:42:57-04:00</updated>

		<published>2004-12-24T02:42:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44465#p44465</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44465#p44465"/>
		<title type="html"><![CDATA[CountDown TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44465#p44465"><![CDATA[
That would be the exact same effect. The bot would say, Please wait 2 minutes everytime and excess flood all the same.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Fri Dec 24, 2004 2:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Stealthx]]></name></author>
		<updated>2004-12-24T01:25:09-04:00</updated>

		<published>2004-12-24T01:25:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44459#p44459</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44459#p44459"/>
		<title type="html"><![CDATA[CountDown TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44459#p44459"><![CDATA[
<blockquote class="uncited"><div>yay, bloatware. something like this should do it<div class="codebox"><p>Code: </p><pre><code>set when "August 20 00:00:00 2005"set why "my birthday!"bind pub - !birthday pub:countdownproc pub:countdown {nick uhost hand chan text} { global when why  set dur [expr [clock scan $when]-[clock seconds]]  putquick "PRIVMSG $chan :There's [duration $dur] until $why"}</code></pre></div></div></blockquote>I've used this countdown coding but anyone got any idea how could I let this TCL to only allow 1-2minutes per public trigger? (!birthday) so that it could prevent my bottie to get excess flood if there's any troublemaker keep pulling the trigger.<br><br>Meaning that the trigger would only activate after 1-2 minutes later after the previous countdown.<br><br>::01:26:00:: &lt;user&gt; !birthday<br>::01:26:01:: &lt;bot&gt; There's 11 hours 9 minutes 6 seconds until XXX, xxth of xxx<br>::01:26:02:: &lt;user&gt; !birthday<br>::01:26:02:: &lt;bot&gt; Please pull the trigger after 1-2 minutes.<br>::01:27:03:: &lt;user&gt; !birthday<br>::01:27:04:: &lt;bot&gt; There's 11 hours 8 minutes 6 seconds until XXX, xxth of xxx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5493">Stealthx</a> — Fri Dec 24, 2004 1:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PLUGGER]]></name></author>
		<updated>2004-11-09T17:01:09-04:00</updated>

		<published>2004-11-09T17:01:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42617#p42617</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42617#p42617"/>
		<title type="html"><![CDATA[CountDown TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42617#p42617"><![CDATA[
Just use this one - why re-invent the wheel...lol<br><div class="codebox"><p>Code: </p><pre><code>################################################ Countdown.tcl 0.1 by #egghelp@efnet (KuNgFo0)## Set the next line as the countdown msg you want to sayset countdown_msg "Its getting nearer - Blackpool get prepared - the nutters are on the way !!!"# Set the next line as the channels you want to run inset countdown_chans "#blackpool"# Set the next line as the date to count down to (Month day time year)set countdown_time "August 20 10:00:00 2004"# Set the next line as the command you want to initiate the countdown updateset countdown_command "!countdown"bind pub - $countdown_command pub_countdownset countdown_time [clock scan $countdown_time]putlog "*** Countdown.tcl 0.1 by #egghelp@efnet loaded"proc pub_countdown {nick uhost hand chan arg} { global countdown_msg countdown_chans countdown_time if {([lsearch -exact [string tolower $countdown_chans] [string tolower $chan]] != -1) || ($countdown_chans == "*")} {  set countdown_diff [expr abs($countdown_time - [unixtime])]  set countdown_secs $countdown_diff  set countdown_mins [expr $countdown_diff / 60]  set countdown_hours [expr $countdown_diff / 3600]  set countdown_days [expr $countdown_diff / 86400]  set countdown_secs [expr int($countdown_secs - (int($countdown_mins) * 60))]  set countdown_mins [expr int($countdown_mins - (int($countdown_hours) * 60))]  set countdown_hours [expr int($countdown_hours - (int($countdown_days) * 24))]  set countdown_days [expr int($countdown_days)]  if {$countdown_days &gt; 0} {   set countdown_temp "$countdown_days day"   if {$countdown_days != 1} {    append countdown_temp "s"   }  }  if {$countdown_hours &gt; 0} {   lappend countdown_temp $countdown_hours hour   if {$countdown_hours != 1} {    append countdown_temp "s"   }  }  if {$countdown_mins &gt; 0} {   lappend countdown_temp $countdown_mins minute   if {$countdown_mins != 1} {    append countdown_temp "s"   }  }  if {$countdown_secs &gt; 0} {   lappend countdown_temp $countdown_secs second   if {$countdown_secs != 1} {    append countdown_temp "s"   }  }  if {$countdown_time &gt; [unixtime]} {   putserv "PRIVMSG $chan :There are: $countdown_temp left till [ctime $countdown_time], $countdown_msg"  } else {   putserv "PRIVMSG $chan :There have been: $countdown_temp since [ctime $countdown_time], $countdown_msg"  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2277">PLUGGER</a> — Tue Nov 09, 2004 5:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-11-09T12:08:00-04:00</updated>

		<published>2004-11-09T12:08:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42613#p42613</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42613#p42613"/>
		<title type="html"><![CDATA[CountDown TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42613#p42613"><![CDATA[
yay, bloatware. something like this should do it<div class="codebox"><p>Code: </p><pre><code>set when "August 20 00:00:00 2005"set why "my birthday!"bind pub - !birthday pub:countdownproc pub:countdown {nick uhost hand chan text} { global when why  set dur [expr [clock scan $when]-[clock seconds]]  putquick "PRIVMSG $chan :There's [duration $dur] until $why"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Tue Nov 09, 2004 12:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Stealthx]]></name></author>
		<updated>2004-11-09T04:36:50-04:00</updated>

		<published>2004-11-09T04:36:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42601#p42601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42601#p42601"/>
		<title type="html"><![CDATA[CountDown TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42601#p42601"><![CDATA[
Hi guys, I'm currently looking for a TCL that countdown to a specify date, when someone trigger a command in the main (example. !count), the bot will respond to it as in (There are 1 week 1 day 1 hour left to 01/01/2005)... The date will be input into the TCL manually so the bot would be able to get the data from the TCL. <br><br>I've found a TCL (Daystill v1.02 by David Proper (Dr. Nibble [DrN])), it's the script that does a countdown too but however, it only countdown for the day (example <strong class="text-strong">There are 47 days left to My Birthday</strong>). The TCL I wan is to check for the duration (exact timing as in day, hours, minutes, seconds).<br><br>This is the coding of the TCL:<br><div class="codebox"><p>Code: </p><pre><code>set daystill(ver) "v1.02.00"proc cmdchar { } {global cmdchar_; return $cmdchar_}bind join - ******* do_daystill_joinproc do_daystill_join {nick uhost hand chan} {global daystill if {![daystillchan $chan]} {return 0} putserv "NOTICE $nick :[getdaystill $daystill(month) $daystill(day) $daystill(year) $daystill(name)]"}proc daystillchan {$chan} {global daystill if {$daystill(onjoinchan) == ""} {return 0} set chans [string tolower $daystill(onjoinchan)] if {$chans == "*"} {set chans [string tolower [channels]]} if {[lsearch -glob $chans [string tolower "*$chan*"]] &gt; -1 } {return 1} return 0}proc getdaystill {month day year name} { set timediff [daystill $month $day $year]if {$timediff &gt; 0} {return "There are [lindex [tdiff2 $timediff] 0] days until $name"}if {$timediff == 0} {return "Today is $name!"}if {$timediff &lt; 0} {                    set timediff [expr $timediff - ($timediff * 2)]                     return "It's been [lindex [tdiff2 $timediff] 0] days Since last $name"                   }                                                                }bind pub - [cmdchar]$daystill(trigger) pub_daystillproc pub_daystill {nick uhost hand chan rest} {global daystill putserv "PRIVMSG $chan :[getdaystill $daystill(month) $daystill(day) $daystill(year) $daystill(name)]"}bind msg - $daystill(trigger) msg_daystillproc msg_daystill {nick uhost handle args} {global daystill putserv "PRIVMSG $nick :[getdaystill $daystill(month) $daystill(day) $daystill(year) $daystill(name)]"}bind dcc - $daystill(trigger) dcc_daystillproc dcc_daystill {handle idx args} {global daystill putdcc $idx "[getdaystill $daystill(month) $daystill(day) $daystill(year) $daystill(name)]"}bind dcc - daystill dcc_daystillmproc dcc_daystillm {handle idx args} {global daystill foreach line $daystill(list) { set month [lindex $line 0] set day [lindex $line 1] set year [lindex $line 2] set name [lrange $line 3 end] putdcc $idx "[getdaystill $month $day $year $name]"                              }}bind msg - daystill msg_daystillmproc msg_daystillm {nick uhost handle args} {global daystill foreach line $daystill(list) { set month [lindex $line 0] set day [lindex $line 1] set year [lindex $line 2] set name [lrange $line 3 end] putserv "PRIVMSG $nick :[getdaystill $month $day $year $name]"                              }}bind pub - [cmdchar]daystill pub_daystillmproc pub_daystillm {nick uhost hand chan rest} {global daystill foreach line $daystill(list) { set month [lindex $line 0] set day [lindex $line 1] set year [lindex $line 2] set name [lrange $line 3 end] putserv "PRIVMSG $chan :[getdaystill $month $day $year $name]"                              }}proc daystill {targetmonth targetday targetyear} {  set rtime [ctime [unixtime]]  set amonth [string range $rtime 4 6]  switch $amonth {    Jan {set month "1"}    Feb {set month "2"}    Mar {set month "3"}    Apr {set month "4"}    May {set month "5"}    Jun {set month "6"}    Jul {set month "7"}    Aug {set month "8"}    Sep {set month "9"}    Oct {set month "10"}    Nov {set month "11"}    Dec {set month "12"}  }  set day [lindex $rtime 2]  set year [string range $rtime 20 23]  set date1 [clock scan $month/$day/$year]  if {$targetyear == 0} {set targetyear $year       set date2 [clock scan $targetmonth/$targetday/$targetyear]       if {$date2&lt;$date1} {set targetyear [expr $year + 1]}                        }  set date2 [clock scan $targetmonth/$targetday/$targetyear]  set date3 [expr $date2 - $date1]  return $date3}proc tdiff {t} { return [dotdiff 1 $t]}proc tdiff2 {t} { return [dotdiff 2 $t]}proc dotdiff {v ltime} { if {$v == 1} {               set m_ "m"               set h_ "h"               set d_ "d"               set s_ "s"              } else {               set m_ " minute"               set h_ " hour"               set d_ " day"               set s_ " second"                     }set days 0set hours 0set minutes 0set seconds 0set after 0set out ""set seconds [expr $ltime % 60]set ltime [expr ($ltime - $seconds) / 60]set minutes [expr $ltime % 60]set ltime [expr ($ltime - $minutes) / 60]set hours [expr $ltime % 24]set days [expr ($ltime - $hours) / 24]if {$v == 1} {if {$days &gt; 0} {append out "${days}$d_ "}if {$hours &gt; 0} {append out "${hours}$h_ "}if {$minutes &gt; 0} {append out "${minutes}$m_ "}if {$seconds &gt; 0} {append out "${seconds}$s_ "}             } else { if {$days &gt; 0} {append out "${days}$d_[thes $days] "} if {$hours &gt; 0} {append out "${hours}$h_[thes $hours] "} if {$minutes &gt; 0} {append out "${minutes}$m_[thes $minutes] "} if {$seconds &gt; 0} {append out "${seconds}$s_[thes $seconds] "}                    }if {[string index $out [expr [string length $out] - 1]] == " "} {  set out [string range $out 0 [expr [string length $out] - 2]]}return "$out"}proc thes {num} {if {$num == 1} {return ""} else {return "s"}}</code></pre></div>Anyone could help?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">  Thanks!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5493">Stealthx</a> — Tue Nov 09, 2004 4:36 am</p><hr />
]]></content>
	</entry>
	</feed>
