A recipient starting with # or will send the message to a channel, anything else will be interpreted as a username.
ircg_msg() will send the message to a channel or user on the server connected to by connection. A recipient starting with # or will send the message to a channel, anything else will be interpreted as a username.