Here's a suggestion that cuts down on your code, yet, with the exception of the messages to the people that don't have access, should work the same.
Code:
 on @10:TEXT:!deop &:#:{
  if ($2 == $me) && ($ulevel == 10) {    notice $nick I don't think so   }
  elseif ($nick !isop $chan) {    notice $nick $2 isn't an op.  }
  elseif ($ulevel == 10) && ($level($address($2,2)) == 11) {    notice $nick $2 is an op, you can't deop him.  }
  else {    mode $chan -o $nick  }
}
 


The @ in the ON TEXT event means that the person running the code must be an op. The 10 in the ON TEXT means that only those with level 10 or higher can activate the code.

Just a suggestion.