Does your script catch limit changes? What about bans?

There's more to modes than just opping/deopping and the like.

You would need to parse the mode command as well and halt that.

Try it.