Added note:
You can automatically unban yourself if you find yourself banned...
on @*:BAN:#channel: {
if ($banmask iswm $address($me,5)) {
mode $chan -bo $banmask $nick
}
}
This will unban yourself if a ban is placed on you, and deop the person who banned you. Be warned that this type of script can cause "script wars" if the other ops have revenge scripts. Also realise if they kick you and then ban you, this will not work as you won't see the ban be set. To detect being kicked, see
/help on kick - the same kind of principal applies.
You should always be careful when opping people. Opping everyone is not a good idea - you should only op your friends. Your friends shouldn't be banning yout IP for fun. If you ask them to stop it, that should be sufficient.
As Diz suggested, check out the networks website, or ask in the #Help channel of the network and see what access levels are available. Any level of op will be able to ban you however and you can't directly stop it from happening. That said, some networks (not many) support a mode that prevents channel owners/founders being banned or kicked from a channel. Again, you'll need to ask in the #Help channel (or equivalent) for such information.
Hope this helps
Regards,