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

	<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>2006-09-03T15:45:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-09-03T15:45:43-04:00</updated>

		<published>2006-09-03T15:45:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66097#p66097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66097#p66097"/>
		<title type="html"><![CDATA[Timers and additions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66097#p66097"><![CDATA[
You should be able to use most of caesar's script. Just have to use variables to store "logon-time", rather than the user database fields.. (arrays with nicks as index comes to mind)<br><br>Only use for timers that I could possibly see, would be some automated logout-feature. Although this would probably be easier to implement without timers aswell.<br><br>As for writing to the logfile, I'd either write on "!logout", or on a regular basis using "bind time". Log rotation would be implemented using "bind time" or "bind evnt".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Sep 03, 2006 3:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2006-09-03T13:58:14-04:00</updated>

		<published>2006-09-03T13:58:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66095#p66095</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66095#p66095"/>
		<title type="html"><![CDATA[Timers and additions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66095#p66095"><![CDATA[
Well the reason i thought the use of timers would be needed was it needs to be started and stoped by the user and then recorded to a text file/database file of some format so the administration can see WHO is actually putting in what amount of times on a per week basis, but none of the users will be on the userlist<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Sep 03, 2006 1:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2006-09-03T06:30:36-04:00</updated>

		<published>2006-09-03T06:30:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66084#p66084</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66084#p66084"/>
		<title type="html"><![CDATA[Re: Timers and additions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66084#p66084"><![CDATA[
<blockquote class="uncited"><div>by "login" you mean simply recording current time for the user issued that command?</div></blockquote>yup<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Sep 03, 2006 6:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[wiz(andrew)]]></name></author>
		<updated>2006-09-03T00:08:49-04:00</updated>

		<published>2006-09-03T00:08:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66075#p66075</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66075#p66075"/>
		<title type="html"><![CDATA[Timers and additions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66075#p66075"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {[onchan $nick $chan] } {...}</code></pre></div> ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8158">wiz(andrew)</a> — Sun Sep 03, 2006 12:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-09-02T23:30:38-04:00</updated>

		<published>2006-09-02T23:30:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66073#p66073</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66073#p66073"/>
		<title type="html"><![CDATA[Re: Timers and additions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66073#p66073"><![CDATA[
<blockquote class="uncited"><div>The basis of login is NOT based on bots userlist but users on a specific channel - anyone on said channel must be able to login/out</div></blockquote>then you need to develop an authorization system first; or by "login" you mean simply recording current time for the user issued that command?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Sep 02, 2006 11:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2006-09-02T21:52:33-04:00</updated>

		<published>2006-09-02T21:52:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66069#p66069</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66069#p66069"/>
		<title type="html"><![CDATA[Timers and additions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66069#p66069"><![CDATA[
No need for timers. Just use the [unixtime] when they login and the difference from NOW in unixtime and the last unixtime recorded:<div class="codebox"><p>Code: </p><pre><code>set now [unixtime]set difference [expr [unixtime - $now]]set duration [duration $difference]</code></pre></div>Also, if all of your users use a specific credentials then I would go for XTRA fields in the userfile for each user in particular.<div class="codebox"><p>Code: </p><pre><code>setuser $hand XTRA LAST [unixtime]</code></pre></div>and to see the actual online time use something like:<div class="codebox"><p>Code: </p><pre><code>set last [getuser $hand XTRA LAST]set difference [expr [unixtime - $last]]set duration [duration $difference]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Sep 02, 2006 9:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2006-09-02T21:41:20-04:00</updated>

		<published>2006-09-02T21:41:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66068#p66068</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66068#p66068"/>
		<title type="html"><![CDATA[Timers and additions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66068#p66068"><![CDATA[
I'm wanting to create a script thats works on the basis of start and stop on a per user level with addition of time...<br><br>for example:<blockquote class="uncited"><div>&lt;nick&gt; !login<br>&lt;bot&gt; Nick you're now logged in<br>&lt;nick2&gt; !login <br>&lt;bot&gt; Nick2 you're now logged in</div></blockquote>While logged in a timer or similar is running basically counting mins which are written to a file<blockquote class="uncited"><div>&lt;nick2&gt; !logout<br>&lt;bot&gt; Nick2 you're now logged out</div></blockquote>in the file it should say similar to:<div class="codebox"><p>Code: </p><pre><code>Nick1 has been logged in for 0 hours 10 mins 23 seconds </code></pre></div>Seconds not really needed but for hours and mins its a must, this file then must restart once every 7 days ( renaming the old one to log.lastweek ..whatever ) <br><br>I'm very uncomfy with timers and ive not worked too often if ever with additions in this manner could someone give me some tips, a starting point or even better point me to one that does the above already <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> ( never know huh ? )<br><br><strong class="text-strong">note</strong><br>The basis of login is NOT based on bots userlist but users on a specific channel - anyone on said channel must be able to login/out<br><br>preferbly with a specific flag being able to log users out that failed to log themselves out<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sat Sep 02, 2006 9:41 pm</p><hr />
]]></content>
	</entry>
	</feed>
