on *:rawmode:*:{
var %mode = $1
tokenize 32 $2-
if $left(%mode,1) == + {
if $pos(%mode,q,0) {
var %a = 1, %b = $pos(%mode,q,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %founders
echo $chan %founders founders
}
inc %a
}
}
if $pos(%mode,a,0) {
var %a = 1, %b = $pos(%mode,a,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %protects
echo $chan %protects protects
}
inc %a
}
}
if $pos(%mode,o,0) {
var %a = 1, %b = $pos(%mode,o,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %ops
echo $chan %ops ops
}
inc %a
}
}
if $pos(%mode,h,0) {
var %a = 1, %b = $pos(%mode,h,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %hops
echo $chan %hops half-ops
}
inc %a
}
}
if $pos(%mode,v,0) {
var %a = 1, %b = $pos(%mode,v,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %voices
echo $chan %voices voices
}
inc %a
}
}
}
else {
if $pos(%mode,q,0) {
var %a = 1, %b = $pos(%mode,q,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %defounders
echo $chan %defounders de-founders
}
inc %a
}
}
if $pos(%mode,a,0) {
var %a = 1, %b = $pos(%mode,a,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %deprotects
echo $chan %deprotects de-protects
}
inc %a
}
}
if $pos(%mode,o,0) {
var %a = 1, %b = $pos(%mode,o,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %deops
echo $chan %deops de-ops
}
inc %a
}
}
if $pos(%mode,h,0) {
var %a = 1, %b = $pos(%mode,h,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %dehops
echo $chan %dehops de-half-ops
}
inc %a
}
}
if $pos(%mode,v,0) {
var %a = 1, %b = $pos(%mode,v,0)
while %a <= %b {
if $($+($,%a),2) == $me {
inc %devoices
echo $chan %devoices de-voices
}
inc %a
}
}
}
}