; Wildcard timer
; Syntax: $cstimer(<wildcard>, [N])
; - wildcard - Value to match timer (Ex: *)
; - N - Nth match, or 0 for complete count of matches
; - N, when not specified, is 0
alias wctimer {
if ($1 != $null) {
if ($timer(0) > 0) {
/set -u0 %timers 0
/set -u0 %a 1
while (%a <= $timer(0)) {
if ($1 iswm $timer(%a)) {
/inc -u0 %timers
if (($2 != $null) && ($2 == %timers)) return $timer(%a)
}
/inc -u0 %a
}
return %timers
}
return 0
}
else /echo -s Missing Parameter: $wctimer(<wildcard>, [N])
}