Site Tools


#$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)

Parameters for Port In Use:

$0 The person the dcc chat or dcc send is being offered to
$1 The type (ie, SEND or CHAT)
$2 The url-encoded filename (if any)
$3 The refnum of the dcc, suitable for dccctl.
$4 The port that was in use.
$5- The literal string “PORT IN USE”

Default Action:

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;


on_dcc_lost.txt · Last modified: 2007/05/20 01:19 by