There is NO, repeat NO, 100% secure way of ensuring that what you are seeing is really ChanServ, et al. If I write a fake mIRCd that spits out the exact numerics in the exact order and timing that a DALnet server does (you can even build in variable lag), and then I have you /server to my IP (or a resolved irc.something.net), I can just as easily fake ANY services reply to fool your script.
With that in mind, any script that auto-responds is quite literally intentionally stupid. But if you don't mind, I certainly don't.
As for scripts that simply reformat the display, no such security is required. All you need to do is check whatever format services on the networks you frequent the most uses and go with that.