Your event deals with all kinds of notices, channel and private alike. Therefor, "if I am an op" has no meaning to this event. The only thing you can do is
1. if you are in 1 channel:
if ($me isop #channelname) { ... }
2. if you are in more than 1 channel:
create a loop that cycles through $chan and checks all channels if you are op in 1 or all of em.