from the name of ur snippet i was kinda thinking there would be more regexs used =/
anyways for the defcon it's kinda pointless to send the global notices when services already do that.
and you could have done something like this for the defcon
if ($regex($1,/^\.dc([1-5])$/iS)) { .os defcon $regml(1) }
as well you can make a lot of ur code a bit shorter...