The below event replaces mIRC's standard output by using the /haltdef command:


on ^*:DEOP:#:{
  echo $colour(mode) # [[ $+ $fulladdress $+ ]] deopped $opnick
  haltdef
}

The below event only allows people with the userlevel MASTER to deop others:


on @*:DEOP:#:{
  IF ($level($nick) != MASTER) && ($nick != $opnick) && ($me != $nick) {
    mode # +o $opnick
    .notice $nick Only Masters are allowed to deop others in #
  }
}

The below yells at the person who deopped you:


on *:DEOP:#:{
  IF (($opnick == $Me) && ($nick != $me)) {
    .msg # Oi! What do you think you are doing?!?
  }
}

The below event tries to reop yourself using chanserv if anyone deops you:


on *:DEOP:#: {
  IF ($me == $opnick) {
    chanserv op # $me
  }
}

The below event colour's the nickname on the nicklist when they are deopped:


on *:DEOP:#:{
  IF($nick !isvo #) { cline 1 # $opnick }
  ELSE { cline 12 # $opnick }
}