K, sry, but i have to put my 2 cents in..
Forst off, Laz's script will only work if the victim of the ban is the banner himself (i.e. i ban myself)-- You would need $bnick == $me, not $nick..
Second off, the point about ($banmask iswm $address($me, 5)) is definatly the best route to take. Its quick and easy, and very effective. To egt you thinking here are a few versions..
Your average on kick script:
on 1:KICK:#: {
; was it us?
if ($knick == $me) {
; auto-rejoin the channel
/join $chan
; assuming we have op again, get him back..
/mode $chan -ov $nick $nick
; if you wish to kick them, uncomment the next line
;/kick $chan $nick Please don't kick me...
}
}
Now, for the ban (choose the one that best fits your situation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First version, with no chanserv access, just auto-op access..
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on @1:BAN:#: {
; was it us?
if (($bnick == $me) || ($banmask iswm $address($me, 5)) {
; unban ourselves
/mode $chan -bbb $banmask
; get him back
/mode $chan -ov $nick $nick
; if you wish to kick them, uncomment the next line
;/kick $chan $nick Please don't ban me...
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; With chanserv acces (Assuming we already identifyed
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on @1:BAN:#: {
; was it us?
if (($bnick == $me) || ($banmask iswm $address($me, 5)) {
; unban ourselves
/chanserv unban $chan $me
; get him back
/mode $chan -ov $nick $nick
; if you wish to kick them, uncomment the next line
;/chanserv kick $chan $nick Please don't ban me... ( $+ $me $+ )
}
}

-KingTomato
http://www.kingtomato.com/AIM: otamoTgniK