Table of Contents

Synopsis:

on [<modes>]ctcp [<serial#>] [-|^]<match> { <action> }

Summary:

Triggered by other people's ctcp commands

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. You should use the on ctcp_request hook 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- Arguments of CTCP command (if any)

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