It may be easier to just do a quick check at the beginning of your script's events/commands. Something like this:
alias stopevents {
if (Frank isop $chan) return 1
return 0
}
on *:EVENT:*:{
if ($stopevents) return
; Your regular script goes here
}
Adjust the /stopevents alias to perform whatever checks you need. Make it return 1 to stop your events from occurring, and return 0 to allow your events to occur.
-genius_at_work