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

	<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>2003-10-29T18:43:40-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-29T18:43:40-04:00</updated>

		<published>2003-10-29T18:43:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29167#p29167</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29167#p29167"/>
		<title type="html"><![CDATA[Changing Text Based on Time of Day]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29167#p29167"><![CDATA[
I forgot to mention...here's an easy way to convert times to seconds past midnight:<div class="codebox"><p>Code: </p><pre><code>set open [expr {[clock scan "9 am"]%86400}]set close [expr {[clock scan "16:00"]%86400}]</code></pre></div>...or you could of course just multiply the decimal hour (0.00-23.98 ) with 3600 to save some cpu. But these calculations should be done only once (when the times are set/changed) and the result should be kept in global variables. (imo)<br>I did the 'clock scan' examples in 12/24 hour formats just to give you an idea of what kind of input clock scan will accept. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Check <a href="http://tcl.tk/man/tcl8.4/TclCmd/clock.htm#M43" class="postlink">http://tcl.tk/man/tcl8.4/TclCmd/clock.htm#M43</a> if you need some more info on this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Oct 29, 2003 6:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-10-29T18:01:33-04:00</updated>

		<published>2003-10-29T18:01:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29164#p29164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29164#p29164"/>
		<title type="html"><![CDATA[Changing Text Based on Time of Day]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29164#p29164"><![CDATA[
Thank you thank you!  I'll assimilate it and see how it works out...<p>Statistics: Posted by Guest — Wed Oct 29, 2003 6:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-29T16:20:54-04:00</updated>

		<published>2003-10-29T16:20:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29156#p29156</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29156#p29156"/>
		<title type="html"><![CDATA[Re: Changing Text Based on Time of Day]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29156#p29156"><![CDATA[
Here's one way to do it<div class="codebox"><p>Code: </p><pre><code># get the number of seconds since midnight...set timeOfDay [expr {[clock seconds]%86400}]# now, just convert your opening/closing times to seconds past midnight and compare them to that valueif {$timeOfDay&gt;=$open &amp;&amp; $timeOfDay&lt;$close} {you're supposed to be avaliable :P}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Oct 29, 2003 4:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-10-29T15:55:29-04:00</updated>

		<published>2003-10-29T15:55:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29155#p29155</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29155#p29155"/>
		<title type="html"><![CDATA[Changing Text Based on Time of Day]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29155#p29155"><![CDATA[
I'd like to be able to send a message via the bot based on the time of day to a user or channel...basically what I have is a customer service bot that assumes oper status on an IRC server and I need it to send a message to customers that join the server and tell them that customer service is "closed" between certain times.<br><br>Any help would be greatly appreciated!<br><br>^_^<p>Statistics: Posted by Guest — Wed Oct 29, 2003 3:55 pm</p><hr />
]]></content>
	</entry>
	</feed>
