First thing, it's a bad idea to make an alias "msg", as that will override the default msg command, which isn't a good idea unless you absolutely know what you're doing.
Second, I can't really help you because... you don't make much sense to me.
You want to message something to a channel, but only if the channel contains an asterisk "*" in it? And when exactly do you want to message this, like in what event?
Elaborate please. Help us help you.