Site Tools


on_dcc_raw

Differences

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

Link to this comparison view

on_dcc_raw [2007/03/02 21:38] (current)
Line 1: Line 1:
 +======Synopsis:​======
 +[[on]] [<​modes>​]dcc_raw [<​serial#>​] [-|^]<​match>​ { <​action>​ }
 +
 +======Description:​======
 +This hook is triggered whenever the client receives a raw message about
 +a tcp connection established,​ or a connection attempt, with $[[connect function|connect]]().
 +Raw messages are sent across established tcp connections with
 +[[DCC]] [[dcc RAW|RAW]].
 +
 +Scripts that use sockets should always set a non-zero serial number for
 +it.  Otherwise, it is very easy to set confusing or conflicting hooks.
 +Each specific instance of a socket application should use a separate
 +serial number, to prevent conflicts.
 +
 +======Parameters:​======
 +|$0    |File descriptor for connection (returned by $[[connect function|connect]]()) |
 +|$1    |Host connected to (hostname or ip address) |
 +|$2    |Code for connection type: \\ **c** - [[DCC RAW]] connection has closed \\ **d** - [[DCC RAW]] connection has incoming data \\ **e** - [[DCC RAW]] nonblocking connect completed successfully. \\ **n** - $[[listen]]() connection has spawned a new [[DCC RAW]] connection |
 +|$3-   ​|**c** - not provided \\ **d** - incoming data \\ **e** - outgoing connection port number \\ **n** - incoming connection port number |
 +
 +======Default Action:​======
 +If you don't suppress this event, the client will display a message to your
 +screen.
 +
 +======Examples:​======
 +To display all successful socket connections:​
 +   on #-dcc_raw 10 "% % e %" (fd, host, type, port) {
 +      xecho -b Connection with $host on port $port \(fd: $fd\)
 +   }
 +
 +======History:​======
 +
  
on_dcc_raw.txt ยท Last modified: 2007/03/02 21:38 (external edit)