From WikiChip
Difference between revisions of "mirc/on events/on chat"
< mirc‎ | on events

(Created On Chat event - mIRC)
 
m (Parameters)
Line 7: Line 7:
 
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The level for the event to trigger.
 
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The level for the event to trigger.
  
<span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>The text that you wish to match. Much like the [[On text - mIRC|ON TEXT]] event, this can be any combination of text letters, numbers, and [[wildcards]].
+
<span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>The text that to be matched. Much like the [[On text - mIRC|ON TEXT]] event, this can be any combination of text letters, numbers, and [[wildcards]].
  
 
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
 
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.

Revision as of 15:11, 24 June 2014

The ON Chat event, much like the ON Serv event, is triggered when a message is sent via a DCC Chat window.

Synopsis

ON <level>:CHAT:<matchtext>:<commands>

Parameters

<level>The level for the event to trigger.

<matchtext>The text that to be matched. Much like the ON TEXT event, this can be any combination of text letters, numbers, and wildcards.

<commands>The commands to be performed when the event listener's criteria is met.

Examples

; This event waits for any user on a DCC Chat to use the
; command !time and then relays back to them the current time
 
ON *:CHAT:!time:msg =$nick The current time is: hh:nntt

In the above example, the msg is not simply followed by the $nick identifier. Instead, the =$nick identifier has been used. This special identifier tells mIRC that the event should not simply send a private message the user, but rather it should message the user's DCC Chat window, if there is one.

Compatibility

Added: mIRC v3.8

Added On: 25/11/95

See Also