I think this is what you mean.
Format: on <level>:TEXT:<matchtext>:<*><?><#[,#]>:<commands>
Example: on 1:TEXT:*help*:#mirc,#irchelp:/msg $nick what's the problem?
? for any private message
# for any channel message
#mirc for any messages on channel #mirc
* for any private or channel messages