Simplify PRIVMSG utility functions with pattern matching