you can use the event prefixes ! to prevent yourself triggering the remote event

Code:
on !*:deop:#: {
  ...
  <your code here>
  ...
}


or use this one ...

Code:
on *:deop:#: {
  if ($nick == $me) { halt }
  else {
    ...
    <what else?>
    ...
  }
}


Charlie