mIRC Home    About    Download    Register    News    Help

Print Thread
#250654 25/01/15 12:55 PM
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
I'm running stats that should reset at midnight. Currently need to disconnect and connect for this to happen. Problem with that is that it resets if my PC goes off unexpectedly also. Is there away to use only timers to run the reset? My script:

Quote:
ON *:DISCONNECT: {
echo -a Disconnected from $network to reset daily stats
statsave
/timerstart -o 00:00 1 20 /server
}

ON *:CONNECT: {
statload
if (%stats_module == $null) set %stats_module on
dailystatsflush
echo -a Connected to $network daily stats
}

ALIAS dailystatsflush {
todaystatclear
msg #ops today's stats will be cleared when the bot resets
/timerstop -o 23:59 1 60 DISCONNECT
}

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
You already use an offline timer to disconnect, why not change that to use statsave, statload and dailystatsflush?


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
Thanks I have tried but not that good at scripting. Will give it another try

Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
Tried but idea how to start. Will live with it till my lightbulb goes on again. Thanks


Link Copied to Clipboard