On TEXT » History » Version 7
Per Amundsen, 02/24/2017 09:33 PM
| 1 | 1 | Per Amundsen | _Added in 1.8.10_ |
|---|---|---|---|
| 2 | |||
| 3 | *<notextile>on <level>:TEXT:<matchtext>:<*|#|?>:<commands></notextile>* |
||
| 4 | |||
| 5 | Triggers whenever a message is received. |
||
| 6 | |||
| 7 | 2 | Per Amundsen | _See also [[on ACTION]], [[on NOTICE]]._ |
| 8 | 1 | Per Amundsen | |
| 9 | 3 | Per Amundsen | _Haltable using ^_ |
| 10 | |||
| 11 | 1 | Per Amundsen | *Parameters* |
| 12 | |||
| 13 | 7 | Per Amundsen | <level> - The [[User Access Level|level]] for the event to trigger. |
| 14 | 1 | Per Amundsen | <matchtext> - The [[Matchtext]] to listen to. |
| 15 | <*|#|?> - The [[Matchtarget]] to listen to. |
||
| 16 | <commands> - The commands to be performed when the event listener's criteria is met. |
||
| 17 | |||
| 18 | *Example* |
||
| 19 | |||
| 20 | <pre> |
||
| 21 | on *:TEXT:*:#:echo -ag Message $1- from $nick on channel $chan |
||
| 22 | 4 | Per Amundsen | |
| 23 | ; Override the text event to print a custom text and then tell AdiIRC to ignore it's own text. |
||
| 24 | on ^*:TEXT:*:*:{ |
||
| 25 | 5 | Per Amundsen | echo -tbf $target $+(<,$nick,>:) $1- |
| 26 | 4 | Per Amundsen | halt |
| 27 | } |
||
| 28 | 6 | Per Amundsen | |
| 29 | ; Ignore all messages containing badword on all channels. |
||
| 30 | on ^*:TEXT:*badword*:*:halt |
||
| 31 | |||
| 32 | ; Ignore all messages starting with !badword on a specific channel. |
||
| 33 | on ^*:TEXT:!badword*:#channel:halt |
||
| 34 | 1 | Per Amundsen | </pre> |