I am only temporarily using that code.
However, on Austnet, it's working fine with ChanOP (I've had no infinite loops).
The simple reason is because its on a QUERY WINDOW OPEN event. Not on TEXT. There is a huge difference there.
I'm not sure how other network services run, but on Austnet, receiving messages from services comes via the form of a notice. If it works differently using ChanServ or whatever, then you should really use the /ignore system.
However, because the code I am using is an on Query Window open event, it would only work if the query window didn't exist :P
I'd also point out, that it's pretty easy to set it up to only notice the nick once, and thus not cause an endless loop.
But thanks for the concern :P