Just a little experiment with the $mode(). This should work correctly to reverse the ban set upon the client running the code. Feel free to give me some pointers, jaytea:
on !@*:rawmode:#:{
if ($mode(1).ban == $+($me,!*@*)) {
mode # -b $v1
}
else {
var %x = 1
while ($mode(%x).ban) {
var %v1 = $v1
if ($istok($+($address($me,0),$chr(32),$&
$regsubex($str(.,9),/./g,$&
$+($chr(32),$address($me,\n)))),%v1,32)) {
mode # -b %v1
}
inc %x
}
}
}