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

	<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>2015-02-28T08:27:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2015-02-28T08:27:04-04:00</updated>

		<published>2015-02-28T08:27:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103551#p103551</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103551#p103551"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103551#p103551"><![CDATA[
many thx guys for all your help ive got it working just fine now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Sat Feb 28, 2015 8:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-02-27T09:11:09-04:00</updated>

		<published>2015-02-27T09:11:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103550#p103550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103550#p103550"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103550#p103550"><![CDATA[
<blockquote class="uncited"><div>... is bind cron supported in ver 1.6.21...<br></div></blockquote>Yes.<blockquote class="uncited"><div>...as it kills the bot...</div></blockquote>This is not enough information for us to be able to try to help you.<br><br>Describe everything that you see when it happens.<br>Especially from the partyline.  (Check your console flags, and be sure that any that could possibly help you see things, are On.)<blockquote class="uncited"><div>...when I add the cron line ...</div></blockquote>This is not enough information  for us to be able to try to help you.<br>Show us the line(s) in question.<blockquote class="uncited"><div>... if not could it be done with bind time plz</div></blockquote>Maybe.  We can't guess as to which way might be best, until we see what you are trying to do.<br><br>You mentioned that you have modified the code from what I wrote.  If the cron bind is somehow causing a problem, I'm assuming that is part of what you modified, because it did not cause a problem when I quickly tested it.   I tested it on a version 1.6.21 bot.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Feb 27, 2015 9:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2015-02-27T07:52:20-04:00</updated>

		<published>2015-02-27T07:52:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103549#p103549</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103549#p103549"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103549#p103549"><![CDATA[
Many thx for the swift reply but I have an issue is bind cron supported in ver 1.6.21 as it kills the bot when I add the cron line if not could it be done with bind time plz<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Fri Feb 27, 2015 7:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-02-27T02:17:42-04:00</updated>

		<published>2015-02-27T02:17:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103548#p103548</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103548#p103548"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103548#p103548"><![CDATA[
Sure, just move out the<div class="codebox"><p>Code: </p><pre><code>[expr {$days==1?"1 day":"$days days"}]</code></pre></div>to a variable<div class="codebox"><p>Code: </p><pre><code>set days2go [expr {$days==1?"1 day":"$days days"}]</code></pre></div>like this, and if you want to use $days2go in another proc then define it globally<div class="codebox"><p>Code: </p><pre><code>proc days2go:announce {min hour day month weekday} { global days2go... rest of the code</code></pre></div>and the same <em class="text-italics">global days2go</em> in any other proc you want.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Feb 27, 2015 2:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2015-02-26T15:26:59-04:00</updated>

		<published>2015-02-26T15:26:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103547#p103547</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103547#p103547"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103547#p103547"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind cron - "01 00 * * *" days2go:announceproc days2go:announce {min hour day month weekday} {set days [expr 7 - [strftime %u]]puthelp "privmsg #announce_chan :[expr {$days==1?"1 day":"$days days"}] to go!"}</code></pre></div>Using this code instead of the announce line is it possible to make a variable so I can incorporate it into another announce line?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Thu Feb 26, 2015 3:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-02-25T10:04:42-04:00</updated>

		<published>2015-02-25T10:04:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103546#p103546</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103546#p103546"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103546#p103546"><![CDATA[
The <em class="text-italics">expr</em> will have no problem with any leading zeroes.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 25, 2015 10:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2015-02-25T05:14:05-04:00</updated>

		<published>2015-02-25T05:14:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103545#p103545</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103545#p103545"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103545#p103545"><![CDATA[
many thx guys both versions work for me im in the process of adding to my script with a couple of modifications once i get it running i'll post the final draft or report any difficulties <br><br>Many thx once again<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Wed Feb 25, 2015 5:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-02-24T16:01:22-04:00</updated>

		<published>2015-02-24T16:01:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103544#p103544</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103544#p103544"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103544#p103544"><![CDATA[
<blockquote class="uncited"><div>Yeah, instead of multiple if statements you could go with <em class="text-italics">switch</em>. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Apart this, good idea willyw.</div></blockquote>I was hoping that it might be so easy to follow that the original poster would be wanting to explore learning some basic TCL for him/her self.<br><blockquote class="uncited"><div>...<br>Not 100% sure and can't test right now, but i think we can use $day variable as well but I'd expect it to have an leading zero, but no problem with that. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"></div></blockquote>Did you mean to say $weekday?<br><br>If so,  then yes - I had flirted with using it, instead of strftime.  I believe it does contain a leading zero, and I don't know what it does on Sunday, and didn't want to try to change dates on a shell, etc.  to experiment and find out.    Then there may have been need to deal with the leading zero, and I just wanted the thing to be so simple that the flow of what was going on was easy to see.<br><br>I hope it works out for the original poster, and that they jump in and try some basic TCL soon.<br><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=10420">willyw</a> — Tue Feb 24, 2015 4:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-02-24T15:41:08-04:00</updated>

		<published>2015-02-24T15:41:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103543#p103543</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103543#p103543"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103543#p103543"><![CDATA[
Yeah, instead of multiple if statements you could go with <em class="text-italics">switch</em>. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Apart this, good idea willyw.<br><br>I was thinking at something similar to be honest when read the first post, but after I have read your post I was thinking why not get creative and pull a rabbit out of the hat.<div class="codebox"><p>Code: </p><pre><code>bind cron - "01 00 * * *" days2go:announceproc days2go:announce {min hour day month weekday} {set days [expr 7 - [strftime %u]]puthelp "privmsg #announce_chan :[expr {$days==1?"1 day":"$days days"}] to go!"}</code></pre></div>Not 100% sure and can't test right now, but i think we can use $day variable as well but I'd expect it to have an leading zero, but no problem with that. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Feb 24, 2015 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-02-24T14:19:10-04:00</updated>

		<published>2015-02-24T14:19:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103542#p103542</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103542#p103542"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103542#p103542"><![CDATA[
Here is another way to do it.  <br>There are probably lots more, too.<br><div class="codebox"><p>Code: </p><pre><code># Feb. 24, 2015#  http://forum.egghelp.org/viewtopic.php?p=103540#103540#####set the channel in which to do the announcementset announce_chan #eggdrop###########bind cron - "01 00 * * *" days2go_announceproc days2go_announce {min hour day month weekday} {global announce_chan        if {[strftime %u] == "6"} {                putserv "privmsg $announce_chan :1 day to go"           }        if {[strftime %u] == "5"} {                putserv "privmsg $announce_chan :2 days to go"           }        if {[strftime %u] == "4"} {                putserv "privmsg $announce_chan :3 days to go"           }        if {[strftime %u] == "3"} {                putserv "privmsg $announce_chan :4 days to go"           }        if {[strftime %u] == "2"} {                putserv "privmsg $announce_chan :5 days to go"           }        if {[strftime %u] == "1"} {                putserv "privmsg $announce_chan :6 days to go"           }        if {[strftime %u] == "0"} {                putserv "privmsg $announce_chan :7 days to go"           }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Feb 24, 2015 2:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-02-24T14:16:47-04:00</updated>

		<published>2015-02-24T14:16:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103541#p103541</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103541#p103541"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103541#p103541"><![CDATA[
<blockquote class="uncited"><div>the countdown for the week would be constantly displayed so as the week progresses it would count down by day until the week is over<br><br>so as of sunday 00.01 the display would show<br><br>7 day/s to go<br><br>then as of monday 00.01 the display would show<br><br>6 day/s to go and so on till the week is over then then rest itsself as to start again<br><br>hope tht makes sence</div></blockquote>Not really.<br>You said, "constantly" - which means just that.  Basically - a flood.  Making an announcement something like once per every two seconds.<br><br>Then you re-iterated what you had already said, pretty much.  That part says that you want it to announce once per day.<br><br>But anyway - here you go:<br><div class="codebox"><p>Code: </p><pre><code># Feb. 24, 2015#  http://forum.egghelp.org/viewtopic.php?p=103540#103540############set the channel in which to do the announcementset announce_chan #eggdrop######################bind cron - "01 00 * * 0" sunday_announcebind cron - "01 00 * * 1" monday_announcebind cron - "01 00 * * 2" tuesday_announcebind cron - "01 00 * * 3" wednesday_announcebind cron - "01 00 * * 4" thursday_announcebind cron - "01 00 * * 5" friday_announcebind cron - "01 00 * * 6" saturday_announceproc sunday_announce {min hour day month weekday} {global announce_chan        putserv "privmsg $announce_chan :7 day/s to go"}proc monday_announce {min hour day month weekday} {global announce_chan        putserv "privmsg $announce_chan :6 day/s to go"}proc tuesday_announce {min hour day month weekday} {global announce_chan        putserv "privmsg $announce_chan :5 day/s to go"}proc wednesday_announce {min hour day month weekday} {global announce_chan        putserv "privmsg $announce_chan :4 day/s to go"}proc thursday_announce {min hour day month weekday} {global announce_chan        putserv "privmsg $announce_chan :3 day/s to go"}proc friday_announce {min hour day month weekday} {global announce_chan        putserv "privmsg $announce_chan :2 day/s to go"}proc saturday_announce {min hour day month weekday} {global announce_chan        putserv "privmsg $announce_chan :1 day to go"}</code></pre></div>This should make the announcement at 1 min past midnight.<br>Once daily.<br><br>With very brief testing, it works for me.<br><br>Test it.<br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Feb 24, 2015 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2015-02-24T12:43:57-04:00</updated>

		<published>2015-02-24T12:43:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103540#p103540</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103540#p103540"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103540#p103540"><![CDATA[
the countdown for the week would be constantly displayed so as the week progresses it would count down by day until the week is over<br><br>so as of sunday 00.01 the display would show<br><br>7 day/s to go<br><br>then as of monday 00.01 the display would show<br><br>6 day/s to go and so on till the week is over then then rest itsself as to start again<br><br>hope tht makes sence<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Tue Feb 24, 2015 12:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-02-24T12:38:46-04:00</updated>

		<published>2015-02-24T12:38:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103539#p103539</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103539#p103539"/>
		<title type="html"><![CDATA[Re: Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103539#p103539"><![CDATA[
<blockquote class="uncited"><div>...<br>so as the week progresses the display would show<br><br>...</div></blockquote>When?  Once?  Right after midnight?     .... or what?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Feb 24, 2015 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2015-02-24T12:01:51-04:00</updated>

		<published>2015-02-24T12:01:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103538#p103538</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103538#p103538"/>
		<title type="html"><![CDATA[Is It Possible ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103538#p103538"><![CDATA[
I run a script where people have a certain time to perform a task.<br><br>The task starts monday 1 min past midnight and ends sunday midnight what i would like to do is something like this as a point of reference for them<br><br>If it was monday the guys would have 7 days to go<br>If it was tuesday the guys would have 6 days to go etc etc <br><br>so as the week progresses the display would show<br><br>7 Day/s Left to go<br>6 Day/s Left to go <br>5 Day/s Left to go<br>4 Day/s Left to go   <br><br>and tomorrow it would show<br><br>3 Day/s Left to go <br><br>im a total noob and wondered if it could be done<br><br>many thx in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Tue Feb 24, 2015 12:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
