def msg(code, input):
    """ msg <channel|username> <msg> - Send a message to a channel, or a user. Admin-only. """
    if len(input.group(2).split()) < 2:
        return code.say('{red}{b}Incorrect usage!: %smsg <channel|username> <msg>' % code.prefix)
    a, b = input.group(2).split(' ', 1)
    if not input.owner and a.lower() in ['chanserv', 'nickserv', 'hostserv', 'memoserv', 'saslserv', 'operserv']:
        return code.say('{red}{b}You\'re not authorized to message those services!')
    code.msg(a, b)