on_ctcp
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | on_ctcp [2011/10/31 20:01] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Synopsis: | ||
+ | [[on]] [< | ||
+ | |||
+ | ======Summary: | ||
+ | Triggered by other people' | ||
+ | |||
+ | ======Description: | ||
+ | This hook is triggered whenever the client has finished processing a CTCP | ||
+ | request and has determined the final disposition of the request should be | ||
+ | displaying it to the user. This hook cannot be used to control how the | ||
+ | client processes CTCP replies. | ||
+ | for that. Doing anything more complicated than an [[echo]] in an [[on ctcp]] | ||
+ | hook is considered bad style. | ||
+ | |||
+ | ======Parameters: | ||
+ | |$0 |Who sent the [[CTCP]] | ||
+ | |$1 |Who they sent it to (your nickname or a channel you're on) | | ||
+ | |$2 |What kind of [[CTCP]] | ||
+ | |$3- | ||
+ | |||
+ | ======Examples: | ||
+ | To customize the normal CTCP message: | ||
+ | on ^ctcp * (sender, recvr, ctcp, args) { | ||
+ | if (*args) { | ||
+ | @args = ': ' ## args; | ||
+ | }; | ||
+ | if (ischannel($recvr)) { | ||
+ | xecho -b $sender sent to $recvr a CTCP $ctcp$args; | ||
+ | } { | ||
+ | xecho -b $sender sent you a CTCP $ctcp$args; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | ======History====== | ||
+ | |||
on_ctcp.txt · Last modified: 2011/10/31 20:01 by 127.0.0.1