#$EPIC: on_dcc_lost.txt,v 1.4 2007/05/20 01:19:15 jnelson Exp $
on [<modes>]dcc_lost [<serial#>] [-|^]<match> { <action> }
This hook is triggered whenever a DCC CHAT or SEND connection ends whether or not the connection was successful or not.
As a special case, this hook is triggered whenever the user specifies a port with the -p flag to dcc chat or dcc send and that port cannot be used because it is already in use. See the second set of parameters. You can hook this event and either do a
@dccctl(SET $4 WANT_PORT <new port>)
or create an entirely new dcc,
defer dcc $1 $0 $urldecode($2) -p <new port>
or you can do nothing, and the dcc will be automatically abandoned.
$0 | nickname of the dcc connection |
$1- | disconnection message (varies) |
If you don't suppress this event, the client will display a message to your screen.
To indicate that dcc connection was terminated:
on ^dcc_lost * (nick, reason) { if (*reason) { @ reason = [: ] ## reason; }; xecho -b DCC connection with $nick lost$reason; };