Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
38
bitchx-docs/5_Programming/on/ctcp
Normal file
38
bitchx-docs/5_Programming/on/ctcp
Normal file
@@ -0,0 +1,38 @@
|
||||
Synopsis:
|
||||
on [<modes>]ctcp [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a CTCP message,
|
||||
whether directly or one sent to a channel it is on.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of CTCP message sender
|
||||
$1 target of CTCP (client's nickname or channel name)
|
||||
$2 type of CTCP
|
||||
$3- arguments to CTCP command, if any
|
||||
|
||||
Examples:
|
||||
To customize the normal CTCP message:
|
||||
on ^ctcp * "*" {
|
||||
if ( [$1] == C ) {
|
||||
echo *** $0 sent a CTCP $2 to $1${[$3] ? [: $3-] : []}
|
||||
} {
|
||||
echo *** $0 sent you a CTCP $2${[$3] ? [: $3-] : []}
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
ctcp(1); on(5) ctcp_reply
|
||||
|
||||
Restrictions:
|
||||
Automatic replies from within this hook are limited by the irc protocol.
|
||||
Since a CTCP is really just a PRIVMSG, the client may only automatically
|
||||
reply with NOTICEs, not MSGs. Any attempt to send a MSG or CTCP from
|
||||
within this hook will result in it automatically being converted to a
|
||||
NOTICE (or CTCP REPLY).
|
||||
|
||||
Other Notes:
|
||||
The client's default behavior of automatically responding to certain CTCP
|
||||
messages cannot be suppressed with this hook. To prevent the client from
|
||||
replying to CTCPs, use IGNORE.
|
||||
|
||||
Reference in New Issue
Block a user