egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can this be done ?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
HVR
Voice


Joined: 10 Dec 2009
Posts: 6

PostPosted: Thu Dec 10, 2009 5:23 pm    Post subject: Can this be done ? Reply with quote

I would like to know if it would be possible to have a time script which only gives the time in Eastern standard time.

Something like:

HVR !est
[bot] It is now 4:23 P.M. E.S.T.

I would be grateful for any help with this.
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Thu Dec 10, 2009 10:22 pm    Post subject: Reply with quote

Assuming the bot is running on UTC (+0000) time
Code:
 bind pub -|- !est pub:est

 proc pub:est {nick host hand chan text} {
  puthelp "PRIVMSG $chan :It is now [clock format [clock scan "5 hours ago"] -format "%H:%M %p"] E.S.T"
 }
Razz
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
HVR
Voice


Joined: 10 Dec 2009
Posts: 6

PostPosted: Thu Dec 10, 2009 10:46 pm    Post subject: Reply with quote

thank you very much for coding this


the bot is running on GMT -6 I believe

installed and have the following result:

[21:39] <Burke> !est
[21:39] <RadioChick> It is now 15:39 PM E.S.T

My questions now would be, what do I change to get the time moved ahead 6 hours, and, how do I get it to display in regular time, not 24 hour format ?
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Dec 11, 2009 3:45 pm    Post subject: Reply with quote

EST is 5 hours behind UTC/GTM, so we would need to use
Code:
 bind pub -|- !est pub:est

 proc pub:est {nick host hand chan text} {
  puthelp "PRIVMSG $chan :It is now [clock format [clock scan "1 hour"] -format "%I:%M %p"] E.S.T"
 }
and we use %I not %H if you want it in 12 hours not 24 hours.

Eggdrop goes off the shell's time, but i belive there is a patch to fix this available from the files page on the main website. But the settings are in eggdrop.conf file Smile
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
HVR
Voice


Joined: 10 Dec 2009
Posts: 6

PostPosted: Sat Dec 12, 2009 2:29 pm    Post subject: Reply with quote

very cool !!!!!

thank you so much !!!!!!!!!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber