Look's like a good script.. I would possibly do it in this way and make it one on *:TEXT: event
on *:TEXT:*:#: {
if ($1 == !ustats) {
if (!$2) { msg $chan $+($nick,:) You have written $iif(!%lines- [ $+ [ $nick ] ],0,%lines- [ $+ [ $nick ] ]) line(s). }
else {
msg $chan $+($nick,:) $2 has written $iif(!%lines- [ $+ [ $2 ] ],0,%lines- [ $+ [ $2 ] ]) line(s).
}
}
else {
inc %lines- [ $+ [ $nick ] ]
}
}
NOTE: This is untested.. Just thrown together.