From WikiChip
Difference between revisions of "mirc/ctcp events"
Line 9: | Line 9: | ||
<syntaxhighlight lang="mIRC">ctcp <level>:<matchtext>:<*|#|?>:<commands></syntaxhighlight> | <syntaxhighlight lang="mIRC">ctcp <level>:<matchtext>:<*|#|?>:<commands></syntaxhighlight> | ||
− | See the {{mIRC on events | + | See the {{mIRC|on events/on text|on text}} event for detailed information about <level> <matchtext> etc |
Line 17: | Line 17: | ||
ctcp *:test:?:ctcpreply $nick success | ctcp *:test:?:ctcpreply $nick success | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | triggers when someone sends a private ctcp "test", which is a privmsg, and then use /ctcpreply, which sends a notice, this will trigger the {{mIRC on events | + | triggers when someone sends a private ctcp "test", which is a privmsg, and then use /ctcpreply, which sends a notice, this will trigger the {{mIRC|on events/on ctcpreply|on ctcpreply}} event for that user. |
<syntaxhighlight lang="mIRC"> | <syntaxhighlight lang="mIRC"> | ||
ctcp *:version:?:ctcpreply $nick mIRC 12.5!! | ctcp *:version:?:ctcpreply $nick mIRC 12.5!! | ||
</syntaxhighlight>would send a second reply to the standard ctcp version. | </syntaxhighlight>would send a second reply to the standard ctcp version. |
Revision as of 16:26, 2 September 2015
CTCP stands for Client-To-Client-Protocol which is a special type of communication between IRC Clients. By creating CTCP events, you can make your mIRC react to commands or requests from other users.
For example when you want to know the version of the client used by an user, you type /ctcp <user> version, this actually send a privmsg
Format
The CTCP event has the following format:
ctcp <level>:<matchtext>:<*|#|?>:<commands>
See the on text event for detailed information about <level> <matchtext> etc
Examples
ctcp *:test:?:ctcpreply $nick success
triggers when someone sends a private ctcp "test", which is a privmsg, and then use /ctcpreply, which sends a notice, this will trigger the on ctcpreply event for that user.
ctcp *:version:?:ctcpreply $nick mIRC 12.5!!
would send a second reply to the standard ctcp version.