on *:JOIN:*:.timer 1 1 maxjoin $chan
alias maxjoin {
echo -a JOIN $1 $nick($1,0,a) $($+(%,chanmax.,$1),2)
if ($nick($1,0) < $($+(%,chanmax.,$1),2)) { return }
set $+(%,chanmax.,$1) $v1
;;;; Your actions below this line ;;;;
msg $1 New high count: $v1
}
on *:TEXT:!maxusers:*:{
if ($($+(%,chanmax.,$chan),2) !isnum 1-) return
;;;; Your actions below this line ;;;;
msg $chan Current high count: $v1
}