| 1 |
! $eterna: ctcp_reply,v 1.9 2021/03/21 04:29:45 mrg Exp $ |
| 2 |
! |
| 3 |
! Copyright (c) 1990-2021 Michael Sandrof, Troy Rollo, Matthew Green, |
| 4 |
! and other ircII contributors. |
| 5 |
! |
| 6 |
! All rights reserved. See the HELP IRCII COPYRIGHT file for more |
| 7 |
! information. |
| 8 |
! |
| 9 |
Usage: ON [#|+|-|^|&|@]CTCP_REPLY [-|^]<parameters> [action] |
| 10 |
This event is activated when you receive a reply from a CTCP |
| 11 |
request that you made (with the CTCP command). For example, |
| 12 |
if you did: |
| 13 |
CTCP BigCheese VERSION |
| 14 |
you would receive a: |
| 15 |
*** CTCP REPLY VERSION from BigCheese: IRCII 2.1beta2 Unix |
| 16 |
from BigCheese. However, if you had: |
| 17 |
ON ^CTCP_REPLY "* VERSION" /echo $0 is using $2- |
| 18 |
and did the CTCP show above, you would get something like: |
| 19 |
BigCheese is using IRCII 2.1beta2 Unix |
| 20 |
The parameters are: |
| 21 |
$0 nick of person who sent the reply |
| 22 |
$1 target of the reply |
| 23 |
$2 The CTCP command being replied to |
| 24 |
$3- The reply itself (depends on $1) |
| 25 |
Note: You may NOT use the CTCP command in an ON CTCP_REPLY. |
| 26 |
It simply will report an error message to you and not work. |
| 27 |
It is illegal to do this and it is not supported. |
| 28 |
|
| 29 |
Note that in ircII 20020902 and earlier, $1 is not the target of |
| 30 |
the reply, but the CTCP command, and $2- is the message. For |
| 31 |
example: |
| 32 |
|
| 33 |
IF (V > 20020902) { |
| 34 |
ON CTCP_REPLY "% % % *" ECHO ctcp reply type $2 from $0 to $1: $3- |
| 35 |
} { |
| 36 |
ON CTCP_REPLY "% % *" ECHO ctcp reply type $1 to $0: $2- |
| 37 |
} |