Code:
on *:deop:#:{
  set %nick $nick
  set %chan $chan
  if (($opnick == $me) && ($nick != $me)) {
    part $chan
    join %chan
    ;.chanserv op $chan $me
    ;or other for you to become an oper on $chan.
    if ($me isop %chan) { kick %chan %nick }
  }
  halt
} 


Slightly modified from Ricky's code, indeed we must make sure we're an op when we join the channel. I assume Ricky thought that upon joining the channel you'd be auto opped in that channel, so it is not entirely his fault. smile

But we do need to make sure we're an op on the channel before you perform revenge commands because as you rightly said, you'll get messages saying you're not an operator.

Line 8 and 9 are comments if there is chanserv on the server use line 8 but remove the comment. Other is another way to gain operator status. I know nothing about big networks so I have no clue about the services they use but if it's X or something send X a message to become an op hope this helps.