on $*:TEXT:/^!(start|stop|info)$/iS:#:{
var %c $regml(1),%s $($+(%,startime,.,$nick),2),%m msg # Timer For $nick has been
if %c = start && !%s {
set $+(%,startime,.,$nick) $ctime
%m initiated
}
if %c = stop && %s {
unset $+(%,startime,.,$nick)
%m stopped at12 $duration($calc($ctime - %s))
}
if %c = info && !$($+(%,floodt,.,#),2) {
inc -eu30 $+(%,floodt,.,#)
msg # Created by Carlosrevilla. Special Thanks to Napa182 for his help. Get The snippet @ http://www.hawkee.com/snippet/7032/
}
}
You could use hash table
on $*:TEXT:/^!(start|stop|info)$/iS:#:{
var %c $regml(1),%s $hget(Crono,$nick),%m msg # Timer For $nick has been
if %c = start && !%s {
hadd -m Crono $nick $ctime
%m initiated
}
if %c = stop && %s {
hdel Crono $nick
%m stopped at12 $duration($calc($ctime - %s))
}
if %c = info && !$hget(Crono,#) {
hinc -mu30 Crono #
msg # Created by Carlosrevilla. Special Thanks to Napa182 for his help. Get The snippet @ http://www.hawkee.com/snippet/7032/
}
}