on TEXT
The on TEXT event triggers when you receive private and/or channel messages.
Format: on <level>:TEXT:<matchtext>:<*><?><#[,#]>:<commands>
Example: on 1:TEXT:*help*:#mirc,#irchelp:/msg $nick what is the problem?
The on ACTION and on NOTICE events use exactly the same format as on TEXT, and trigger on an action and on a notice event respectively.
The match text can be a wildcard string, where:
* matches any text
& matches any word
text matches if text contains only this word
text* matches if text starts with this word
*text matches if text ends with this word
*text* matches if text contains this word anywher
The match text can also be a regular expression. See the $ prefix section in Access Levels.
The location where this event occurs can be specified using:
? for any private message
# for any channel message
#mirc for any messages on channel #mirc
* for any private or channel messages
Examples
on 1:TEXT:hello*:#:/msg $chan Welcome to $chan $nick!
This listens on any channel for any line beginning with the word hello and welcomes the user who said it to the channel.
on 1:TEXT:*cookie*:#food:/describe $chan gives $nick a cookie
This listens on channel #food for any message containing the word cookie and gives the user who said it a cookie.