From WikiChip
Editing mirc/on events/on text
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
The '''on text''' event is a mIRC event that triggers when a remote user (I.E. not the local user) receives a channel or a query message. | The '''on text''' event is a mIRC event that triggers when a remote user (I.E. not the local user) receives a channel or a query message. | ||
Line 5: | Line 4: | ||
<source lang="mIRC"> | <source lang="mIRC"> | ||
on <level>:text:<matchtext>:<target>:<commands> | on <level>:text:<matchtext>:<target>:<commands> | ||
+ | |||
+ | ;or | ||
+ | |||
+ | on <level>:text:<matchtext>:<target>:{ | ||
+ | |||
+ | } | ||
</source> | </source> | ||
== Level == | == Level == | ||
− | * '''<level>''' - The appropriate | + | * '''<level>''' - The appropriate [[access levels - mIRC|access level]] for the event. |
== Matchtext == | == Matchtext == | ||
− | + | The '''<matchtext>''' is the text pattern that mIRC will use to compare with every user message. Once the text has been matched (and the channel if provided), the event will trigger. | |
− | |||
=== Wildcard text pattern === | === Wildcard text pattern === | ||
Line 25: | Line 29: | ||
* *!test - the matchtext will match if the text ends with the word "!test" | * *!test - the matchtext will match if the text ends with the word "!test" | ||
* *!test* - the matchtext will match any text that has "!test" in it (anywhere) | * *!test* - the matchtext will match any text that has "!test" in it (anywhere) | ||
− | |||
=== The basic text pattern === | === The basic text pattern === | ||
− | The most basic on text event is the normal | + | The most basic on text event is the normal wildcard pattern: |
<syntaxhighlight lang="mIRC">on *:text:!help:#:{ | <syntaxhighlight lang="mIRC">on *:text:!help:#:{ | ||
Line 42: | Line 45: | ||
=== RegEx text pattern === | === RegEx text pattern === | ||
− | The matchtext parameter can also be a Regular Expression Pattern by | + | The matchtext parameter can also be a Regular Expression Pattern by prefixing the user level with a dollar sign ($) |
Example: | Example: | ||
Line 65: | Line 68: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
− | If the entire match text | + | If the entire match text patter contains a SINGLE variable, the $() is not required. |
Example: | Example: | ||
Line 90: | Line 93: | ||
Example: | Example: | ||
− | <syntaxhighlight lang="mIRC">;let %chan equal #mSL,#help,# | + | <syntaxhighlight lang="mIRC">;let %chan equal #mSL,#help,#supprt |
on *:text:!hi:%chan:{ | on *:text:!hi:%chan:{ | ||
notice $nick Hello! | notice $nick Hello! | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also== | == See also== | ||
Line 113: | Line 103: | ||
* [[List of commands - mIRC|List of commands]] | * [[List of commands - mIRC|List of commands]] | ||
+ | [[Category:mIRC on events]] | ||
{{DEFAULTSORT:text, on mIRC}} | {{DEFAULTSORT:text, on mIRC}} | ||
− | |||
− | |||
− |