On !*:ban:#:{
if $banmask iswm $address($me,5) && $banmask != *!*@* {
if $me isop # || o isin $usermode {
mode # -bo+b $banmask $nick $wildsite
}
}
}
This code reacts when a banmask matches your address. if you're an op, or IRC operator (has 'o' flag in your usermode), then it removes the ban, deops the op who set it, and bans him.