on ctcp_request
This hook is triggered when the client receives a CTCP request.
It's important to understand the difference between this and on ctcp. The on ctcp event is thrown for when the client has already handled the request and wants to tell the user. But on ctcp_request is thrown “early”, giving you first access to the request, before the client does anything. If you handle on ctcp_request you will suppress the client's normal handling of that ctcp so don't suppress stuff like dcc.
The only appropriate response to a on ctcp_request is a ctcp command that is sent as a proper reply (the client handles that). If you try to send a msg the client will convert it to a notice.
To customize CTCP VERSION replies:
on ^ctcp_request "% % VERSION*" (sender, recvr, type, args) { ctcp $sender VERSION ircII $J + myscript; };
# $EPIC: on_ctcp_request.txt,v 1.7 2012/07/04 06:30:23 jnelson Exp $