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 

want help with a time left command

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
janii
Halfop


Joined: 03 Aug 2011
Posts: 41

PostPosted: Thu Apr 19, 2012 7:40 pm    Post subject: want help with a time left command Reply with quote

I made a code for time left for stats reset on daily bases now i want it to show days to left until next month reset

Code:

duration [expr {[clock scan "tomorrow 00:00"] - [clock seconds]}] "
}


and it shows
Daily Stats Reset in: 19 hours 39 minutes 23 seconds

Now i want to add one more command with it tht whn sum1 do !time
the bot shall answer like this

Daily Stats Reset in: 19 hours 39 minutes 23 seconds & Monthly stats Reset in : 11 days 5 hours 59 minutes 40 seconds.

if its 19th April and month to be end on 1st May
Thanx in advance


Last edited by janii on Sun Apr 22, 2012 12:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pixelz
Voice


Joined: 15 Jun 2005
Posts: 24
Location: EFnet

PostPosted: Sat Apr 21, 2012 2:15 pm    Post subject: Reply with quote

This was a pretty interesting question, here you go:

Code:
duration [expr {[clock scan [clock format [clock scan "next month"] -format "%Y-%m-01"]] - [clock seconds]}]

_________________
Pixelz @ EFnet, freenode, QuakeNet, Undernet
Back to top
View user's profile Send private message
janii
Halfop


Joined: 03 Aug 2011
Posts: 41

PostPosted: Sun Apr 22, 2012 12:32 pm    Post subject: Reply with quote

ThankYou Pixelz
Your code is working perfectly now thanx once again
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 -> Scripting Help 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