| View previous topic :: View next topic |
| Author |
Message |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Sat Jun 03, 2006 12:38 pm Post subject: Clock script |
|
|
Hi, I have searched the tcl pages and googled it but i can seem to find a script so that if i type !GMT in a channel the bot responds with the current time in GMT...
Does anyone know of a script like this or where to get it please ?
Thanks in advance  _________________ www.NT-Hosts.Net - More than just a host |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun Jun 04, 2006 12:37 pm Post subject: |
|
|
Actually there is a script called worldtime.tcl around here, which can be changed to query it. I am personally currently working on something major about time zones, but I cannot find the ideal way/page to query the offset from a timezone name. It currently looks like I'd have to temporarily change env(TZ) ^-^.
But queriing GMT times can be done via RFC 867 or RFC 868 time servers, if the shell local time is not accurate enough.
@caesar:
I dont want to discourage you, but clock in TCL 8.4 has a few less features. I would be happy to be able to use these  _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Sun Jun 04, 2006 5:06 pm Post subject: lol |
|
|
Thanks De Kus,
I tried it but it dont work, seems its a VERY old script, back from 2001 it says no longer works lol
Oh well, thanks anyway  _________________ www.NT-Hosts.Net - More than just a host |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Mon Jun 05, 2006 6:37 am Post subject: |
|
|
I think there was a fix floating around... Though I am not sure, if it can still query the most recent changes of the layout.
I changed the regexp to
| Code: | | regexp {<div id="analog-digital"><font size="7">(.+?)</font></div>} $tzout {} tztime |
when the site changed last time, but since I changed many things, I have no idea, if you can use that in any way .
and the url is created now by:
| Code: | | set url "/current_time_in_[lindex $tempurl 0].aspx?[lindex $tempurl 1]" |
_________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
|