I have, with help from here managed to compile some script but not working properly. Please help with suggestions to simplify or correct. Think the problem maybe with the timerresetstats not ON or something. My script pertaining to the problem: mIRC 6.35
/*
Commands:
!stats [nick] => Overall stats for $nick|$2 in $network@#Channel
!top10 => Overall top 10 chatters in $network@channel
!tstats [nick] => Today's stats about $nick|$2
!ttop10 => Today's top 10 chatters in $network@#Channel
!delstats <nick> => Removing statistics about $2 in $network@#Channel
!clearstats => Removing all statistics collected for $network@#Channel
!ResetDaily => Reset daily stats
!ResetDailyNow => Reset daily stats in real time
*/
;the one that I'm struggling with is: ;!ResetDaily Reset daily stats
;==========
ON *:TEXT:*:#: {
if %stats_module == On {
IF ($1 == %c $+ top10) {
IF (%stats_floodpro >= 3) {
halt
}
inc -u30 %stats_floodpro 1
msg $chan $maketop10($network $+ @ $+ $chan)
unset %stats_top10_*
window -c @top10source
}
;========== if !ResetDaily is excecuted
if %stats_module == On {
IF ($1 == %c $+ ResetDaily) {
IF (%stats_floodpro >= 3) {
halt
}
inc -u30 %stats_floodpro 1
dailystatsflush
;=========== connect to network load stats
ON *:CONNECT: {
statload
if (%stats_module == $null) set %stats_module on
timerresetstats 23:59 1 60 dailystatsflush
}
;=========== disconnect from network save AND clear stats
ON *:DISCONNECT: {
echo -a ::: Stats ::: Storing stats.
statsave
}
ALIAS dailystatsflush {
timerresetstats 23:59 0 60 todaystatclear
todaystatclear
msg #ops today's stats will be cleared when the bot disconnects
}
;=========== action on disconnect from network
ALIAS todaystatclear {
hfree -w todaytotal*
hmake todaytotalwords 10
hmake todaytotalletters 10
hmake todaytotalcommands 10
hmake todaytotalactions 10
hmake todaytotallines 10
}