Thanks, that worked perfectly! (I thought I'd have to change a ton more lines than that :/ )
Yes, the easiest way is to simply check the version of the ircd, the main ones would be easy to code, but you'd have to have something that adapted to new ones that you don't know about, perhaps adding them to the table for the user (and if it's not too suspicious, report it to your site, which could then update the table for everyone, and each revision you'd have a more up to date table.)
I know that plexus will do it that way (only blocks colors if you're a reg), unreal blocks it regardless of your chan status, and digircd-1.1(01)-beta acts the same as plexus. Perhaps you and your staffers are on other networks and can do a "/raw version" look at the $1 and make a hashtable, or a couple variables that list each network type under what they allow. I figure this would be easier than just listing by network since networks can change and you can't look at all 3k+ networks that are prolly out there.