To use, just type /banac the message is optional. It bans the user from the room, and if the user is in any other room that you have op in it will ban him and kick him with the message if you put one.
banac {
if ($scid($activecid).status == disconnected) { echo -a Disconnected from active server | halt }
echo -a Banning $1
var %b 1
while (%b <= $chan(0)) {
var %c 1
while (%c <= $nick($chan(%b),0)) {
if ($nick($chan(%b),%c) == $1) && ($me isop $chan(%b)) {
mode $chan(%b) +b $address($1,2) | kick $chan(%b) $1 $iif($2,$2-,Banned.)
}
inc %c
}
inc %b
}
}
Here is a code that i made aswell, http://www.hawkee.com/snippet/2803/, doing the same thing as yours, but on all networks. A little more flexiblity on it, as you can ban several persons, you might learn something from it hehe :p.
And can\'t you just do if ($status == disconnected) { ?