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!
wiiguy
Voice
Posts: 9 Joined: Fri Nov 30, 2007 3:30 pm
Post
by wiiguy » Thu Dec 06, 2007 6:13 pm
starpossen wrote: Will try and mess around with that, by the way, I was wondering, would it be possible to a public command to show time left until set date?
like !xmas
and bot would respond with the timeleft.
yes there is
Code: Select all
bind pub m "!xmas" count:down1
proc count:down1 {nick host handle channel text} {
set christmas "[duration [expr {[clock scan 12/25/07] - [clock seconds]}]]"
set newyear "[duration [expr {[clock scan 01/01/08] - [clock seconds]}]]"
puthelp "NOTICE $nick :$christmas before Christmas \[25th December, 2007\] and $newyear before New Year \[1st January, 2008\]"
}
and i found out what the timezone the server is in it is in GMT and i am in GMT+1 so cany anyone help me ?
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Thu Dec 06, 2007 7:23 pm
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
wiiguy
Voice
Posts: 9 Joined: Fri Nov 30, 2007 3:30 pm
Post
by wiiguy » Fri Dec 07, 2007 4:10 am
i really meant with the script becaus i am still learning tcl.
so basically what i need is that he show the count down for GMT+1
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Dec 07, 2007 6:38 am
If your bot's timezone is GMT and yours is GMT+1 then you're 1 hour closer to Christmas and New year. So just subtract 3600 seconds from [clock seconds]:
Code: Select all
set christmas "[duration [expr {[clock scan 12/25/07] - [clock seconds] - 3600}]]"
set newyear "[duration [expr {[clock scan 01/01/08] - [clock seconds] - 3600}]]"