This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Clock script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
N
NTHosts
Op
Posts: 100
Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:

Clock script

Post by NTHosts »

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 :D
www.NT-Hosts.Net - More than just a host
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Check the clock - Obtain and manipulate dates and times page and do it yourself.
Once the game is over, the king and the pawn go back in the same box.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
N
NTHosts
Op
Posts: 100
Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:

lol

Post by NTHosts »

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 :P
www.NT-Hosts.Net - More than just a host
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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: Select all

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 :D.
and the url is created now by:

Code: Select all

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...
Post Reply