I've left out a check to see if the deopper is you ($me). Now it will not deop if you are the one doing the deop.

Code:
on @1:DEOP:#:{
  if ($ulist($address($opnick,2),5,1) != $null) {
    mode # +o $opnick
    if ($nick ison #) {
      if ($nick != $me) {
        mode # -o $nick
      }
    }
  }
}