It was a long time ago I made scripts. This code works great for me.
The code could take longer times in channels that have many users.
If someone else could come up with a better way, that would be nice.
on 1:INPUT:#:*:{
var %totalNicks = $nick($chan,0)
%inc = 1
while(%inc < %totalNicks) {
if ($nick($chan,%inc) == $1) {
say $+($1,:,$chr(32)) $2-
haltdef
}
inc %inc
}
}