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

	<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-10T02:15:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-10T01:53:23-04:00</updated>

		<published>2011-02-10T01:53:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96000#p96000</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96000#p96000"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96000#p96000"><![CDATA[
Ah, i knew I should stick to " <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> I fixed the above codes.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Feb 10, 2011 1:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2011-02-09T15:41:36-04:00</updated>

		<published>2011-02-09T15:41:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95999#p95999</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95999#p95999"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95999#p95999"><![CDATA[
Thanks caesar works exactly how i need it to<br><br>Would it be possible to extend on it a bit further im looking for some thing that will count the amount of times users have been set +v in #CWUKCountdown it should then display the top person thats been voice the most with The top player of this game was NICK with a total of amountvoiced(Top answers) this round needs to be done directly after it sends the command !newweek once it sends it to the channel it needs to delete the info and count all ova again<br><br><br>Edited now using updated eggy<br><br>GETTING THE FOLLOWING ERROR<div class="codebox"><p>Code: </p><pre><code>[20:54] &lt;CWUKCountdown&gt; [15:54:00] Tcl error [cron:week]: illegal channel: '#CWUKCountdown'</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Wed Feb 09, 2011 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-10T02:15:12-04:00</updated>

		<published>2011-02-09T13:58:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95996#p95996</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95996#p95996"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95996#p95996"><![CDATA[
Checking if 'WScrabble' is on the #channel channel is easy achieved with:<div class="codebox"><p>Code: </p><pre><code>if {![onchan "WScrabble" #channel]} return</code></pre></div>as for idle part, for instance:<div class="codebox"><p>Code: </p><pre><code>if {[getchanidle "WScrabble" "#channel"] &gt; 10} return</code></pre></div>would mean if the idle time is above 10 minutes then nothing else would happen.<br><br>Anyway, here is what you want:<div class="codebox"><p>Code: </p><pre><code>bind time - "59 * * * *" time:weekbind time - "00 * * * *" time:weekproc time:week {min hour day month year} {  if {![onchan "WScrabble" "#channel"]} return  if {[getchanidle "WScrabble" "#channel"] &gt; 10} return  if {[string trimleft $min 0] == 59} {    putserv "PRIVMSG #some_channel :week will start in 1 minute"    }    putserv "PRIVMSG #some_channel :!newweek"  }}</code></pre></div>You should replace '10' with the time in <span style="text-decoration:underline">minutes</span> that would define the maximum idle time 'WScrabble' should have, anything above that would make the bot be quiet.<br><br>Honestly I would upgrade to 1.6.20 and use the 'cron' instead.<div class="codebox"><p>Code: </p><pre><code>bind cron - {*/59 * * * *} cron:weekbind cron - {* */1 * * *} cron:weekproc cron:week {minute hour day month weekday} {  if {![onchan "WScrabble" "#channel"]} return  if {[getchanidle "WScrabble" "#channel"] &gt; 10} return  if {[string trimleft $minute 0] == 59} {    putserv "PRIVMSG #some_channel :week will start in 1 minute"    } else {    putserv "PRIVMSG #some_channel :!newweek"  }}</code></pre></div>At this point you wouldn't notice any difference, but later on if you would like to make this script work only on specific days and/or between or at specific hours for instance, for example run from Monday to Friday, then with 'cron' would be just making a change on the binds:<div class="codebox"><p>Code: </p><pre><code>bind cron - {*/59 * * * 1-5} cron:weekbind cron - {* */1 * * 1-5} cron:week</code></pre></div>while for 'time' things would be different, as it expects 5 space separated integers and flags are ignored, thus having to change the code to:<div class="codebox"><p>Code: </p><pre><code>bind time - "59 * * * *" time:weekbind time - "00 * * * *" time:weekproc time:week {min hour day month year} {  switch [string trimleft $day 0]  {    "6" { return }    "7" { return }    default {      if {![onchan "WScrabble" "#channel"]} return      if {[getchanidle "WScrabble" "#channel"] &gt; 10} return      if {[string trimleft $min 0] == 59} {        putserv "PRIVMSG #some_channel :week will start in 1 minute"        } else {        putserv "PRIVMSG #some_channel :!newweek"      }    }  }}</code></pre></div>just to achieve the same result.<br><br>The difference is even more noticeable if we where to complicate things like making this run between specific hours, for instance 09:00 - 17:00.<br><br>If with 'cron' we just add '9-17' in the binds:<div class="codebox"><p>Code: </p><pre><code>bind cron - {*/59 * 9-17 * 1-5} cron:weekbind cron - {* */1 9-17 * 1-5} cron:week</code></pre></div>the 'time' would require at least two extra lines of code:<div class="codebox"><p>Code: </p><pre><code>set hour [string trimleft $hour 0]if {$hour &lt; 9 &amp;&amp; $hour &gt; 17} return</code></pre></div>and the code would be changed to:<div class="codebox"><p>Code: </p><pre><code>bind time - "59 * * * *" time:weekbind time - "00 * * * *" time:weekproc time:week {min hour day month year} {  switch [string trimleft $day 0]  {    "6" { return }    "7" { return }    default {      set hour [string trimleft $hour 0]      if {$hour &lt; 9 &amp;&amp; $hour &gt; 17} return      if {![onchan "WScrabble" "#channel"]} return      if {[getchanidle "WScrabble" "#channel"] &gt; 10} return      if {[string trimleft $min 0] == 59} {        putserv "PRIVMSG #some_channel :week will start in 1 minute"        } else {        putserv "PRIVMSG #some_channel :!newweek"      }    }  }}</code></pre></div>While 'cron-ed' procs are executed only at the time interval we specified at 'bind' line, the same thing can't be said about 'time' as it would run every 59 minutes, respectively 60 minutes every hour, every day. Sure, we can make it run only at specified hours too, but would require even more lines of code:<div class="codebox"><p>Code: </p><pre><code>bind time - "59 9 1 * *" time:weekbind time - "00 9 1 * *" time:weekbind time - "59 10 1 * *" time:weekbind time - "00 10 1 * *" time:week</code></pre></div>and so on for day one up to:<div class="codebox"><p>Code: </p><pre><code>bind time - "59 17 1 * *" time:weekbind time - "00 17 1 * *" time:week</code></pre></div>and this just for day 1. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>Bottom line is that you should upgrade to 1.6.20 and use the 'cron' instead. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>Edit: Fixed.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 09, 2011 1:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2011-02-09T12:33:00-04:00</updated>

		<published>2011-02-09T12:33:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95994#p95994</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95994#p95994"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95994#p95994"><![CDATA[
Cool the above script worked <br><br>is it possible to extend on it id like it to check if WScrabble is in the room if it is then it will execute those commands if the nickname wscrabble is not in the room or idle it will do nothing till the wscrabble re-enters the room or is no longer idle<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Wed Feb 09, 2011 12:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-08T10:43:54-04:00</updated>

		<published>2011-02-08T10:43:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95983#p95983</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95983#p95983"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95983#p95983"><![CDATA[
If possible you should upgrade to 1.6.20, if not, something this <span style="text-decoration:underline">should</span> do the trick:<div class="codebox"><p>Code: </p><pre><code>bind time - "59 * * * *" time:warnbind time - "00 * * * *" time:weekproc time:warn {min hour day month year} {   putserv "PRIVMSG #some_channel :week will start in 1 minute"}proc time:week {min hour day month year} {   putserv "PRIVMSG #some_channel :!newweek"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Feb 08, 2011 10:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2011-02-08T10:20:19-04:00</updated>

		<published>2011-02-08T10:20:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95982#p95982</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95982#p95982"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95982#p95982"><![CDATA[
In the partyline, send this command:<div class="codebox"><p>Code: </p><pre><code>.status</code></pre></div>and copy-n-paste the first line returned.<br><br>It will look like this:<blockquote class="uncited"><div> I am &lt;botnick&gt;, running eggdrop v1.6.20: xx users (mem: xxxk).</div></blockquote>The purpose is to identify and tell us the version of Eggdrop that you are currently using.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Feb 08, 2011 10:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2011-02-08T08:09:58-04:00</updated>

		<published>2011-02-08T08:09:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95981#p95981</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95981#p95981"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95981#p95981"><![CDATA[
Hi caesar getting an error when i try load this up<div class="codebox"><p>Code: </p><pre><code>[07:07] Tcl error in file 'eggdrop.conf':[07:07] bad type, should be one of: act, away, bcst, bot, chat, chjn, chof, chon, chpt, ctcp, ctcr, dcc, disc, evnt, filt, flud, join, kick, link, load, lost, mode, msg, msgm, need, nick, nkch, notc, note, part, pub, pubm, raw, rcvd, rejn, sent, sign, splt, time, topc, tout, unld, wall    while executing"bind cron - {*/59 * * * *} cron:warn "    (file "scripts/random.tcl" line 1)    invoked from within"source scripts/random.tcl"    (file "eggdrop.conf" line 1340)[07:07] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Tue Feb 08, 2011 8:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-08T07:05:57-04:00</updated>

		<published>2011-02-08T07:05:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95980#p95980</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95980#p95980"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95980#p95980"><![CDATA[
With the new 'cron' bind in 1.6.20 it's quite easy:<div class="codebox"><p>Code: </p><pre><code>bind cron - {*/59 * * * *} cron:warnbind cron - {* */1 * * *} cron:weekproc cron:warn {minute hour day month weekday} {   putserv "PRIVMSG #some_channel :week will start in 1 minute"}proc cron:week {minute hour day month weekday} {   putserv "PRIVMSG #some_channel :!newweek"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Feb 08, 2011 7:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2011-02-07T21:17:35-04:00</updated>

		<published>2011-02-07T21:17:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95977#p95977</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95977#p95977"/>
		<title type="html"><![CDATA[timed command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95977#p95977"><![CDATA[
Hey<br><br>Im looking for a small script that will send a command to a channel every 60 minutes the command being !newweek but about a minute before it sends the command it needs to noyify the channel that a new round will be starting in 1 minute<br><br><br>many thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Mon Feb 07, 2011 9:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
