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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
HVR
Voice
Posts: 6 Joined: Thu Dec 10, 2009 5:15 pm
Post
by HVR » Thu Dec 10, 2009 5:23 pm
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.
TCL_no_TK
Owner
Posts: 509 Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire
Post
by TCL_no_TK » Thu Dec 10, 2009 10:22 pm
Assuming the bot is running on UTC (+0000) time
Code: Select all
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"
}
HVR
Voice
Posts: 6 Joined: Thu Dec 10, 2009 5:15 pm
Post
by HVR » Thu Dec 10, 2009 10:46 pm
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 ?
TCL_no_TK
Owner
Posts: 509 Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire
Post
by TCL_no_TK » Fri Dec 11, 2009 3:45 pm
EST is 5 hours behind UTC/GTM, so we would need to use
Code: Select all
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
HVR
Voice
Posts: 6 Joined: Thu Dec 10, 2009 5:15 pm
Post
by HVR » Sat Dec 12, 2009 2:29 pm
very cool !!!!!
thank you so much !!!!!!!!!!!