on *:RAWMODE:#: {
var %modes = $remove($1,-,+)
var %x = $numtok($2-,32)
while (%x) {
var %i = $len(%modes)
while (%i) {
if (u == $mid(%modes,%i,1)[color:red])[/color] && ($left($1,1) == -) {
if ($gettok($2-,%i,32) isop $chan) { cline 12 # $gettok($2-,%i,32) }
elseif ($gettok($2-,%x,32) ishop $chan) { cline 11 # $gettok($2-,%x,32) }
elseif ($gettok($2-,%x,32) isvoice $chan) { cline 3 # $gettok($2-,%x,32) }
else { cline 13 # $gettok($2-,%x,32) }
}
if (u == $mid(%modes,%i,1)[color:red])[/color] && ($left($1,1) == +) {
if ($gettok($2-,%x,32) isop $chan) { cline 12 # $$gettok($2-,%x,32) }
elseif ($gettok($2-,%x,32) ishop $chan) { cline 11 # $$gettok($2-,%x,32) }
elseif ($gettok($2-,%x,32) isvoice $chan) { cline 3 # $$gettok($2-,%x,32) }
else { cline [color:blue]1[/color] # $gettok($2-,%x,32) }
}
dec %i
}
dec %x
}
}