User Tools

Site Tools


on_dcc_connect

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

on_dcc_connect [2011/10/31 20:06] (current)
Line 1: Line 1:
 +======Synopsis:​======
 +[[on]] [<​modes>​]dcc_connect [<​serial#>​] [-|^]<​match>​ { <​action>​ }
 +
 +======Summary:​======
 +Triggered when [[DCC CHAT]] or [[DCC SEND]] is accepted.
 +
 +======Description:​======
 +This hook is triggered whenever the client successfully establishes a
 +DCC connection with another client. ​ Currently, this is either a [[DCC CHAT|CHAT]]
 +or a [[DCC SEND|SEND]] connection.
 +
 +======Parameters:​======
 +|$0 | nickname of remote client |
 +|$1 | type of [[DCC]] connection |
 +|$2 | ip address of remote client |
 +|$3 | port on the ip address the client is connected to |
 +|$4 | file name ([[dcc SEND|SEND]] only) |
 +|$5 | file size ([[dcc send|SEND]] only) |
 +
 +======Default Action:​======
 +If you don't suppress this event, the client will display a message to
 +your screen.
 +
 +======Examples:​======
 +To customize the connection message:
 +   on ^dcc_connect * (nick, type, addr, port, fname, fsize) {
 +      xecho -b DCC $type connection with $(nick)[$addr:​$port] established;​
 +      if (type == '​send'​) {
 +         xecho -b Transferring $fname \($fsize bytes\);
 +      };
 +   };
 +
 +======Other Notes:​======
 +Note that establishing a [[DCC]] connection does not involve the irc
 +network. Thus, the $[[userhost function|userhost]]() function will not
 +work inside this hook.
 +
 +For a [[DCC]] [[dcc send|SEND]] connection, this will be hooked twice. Once
 +with $1 being SEND, and again being GET. This is for compatibility with bitchx.
 +
 +======History:​======
  
on_dcc_connect.txt ยท Last modified: 2011/10/31 20:06 (external edit)