BTW:
Code:
  if ($read(protect2.txt,w,$+(,$nick))) { return }

^^ You could use mIRCs protect feature
  • /protect [-rw] <on|off|nick> [#channel1,#channel2,...] [type] [network]
    e.g. /protect fred101!*@*.host.com #chanel5 Netwrok

Code:
  if $protect($nick) { return }
  ; ^ for any matching protect entry
  if $nick isprotect # { return }
  ; ^ for channel specific protect entry


Combine the first two lines
Code:
  if ($nick isop # || $protect($nick)) { return }
  if ($nick isop # || $nick isprotect #) { return }