on_dcc_raw
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | on_dcc_raw [2007/03/02 21:38] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Synopsis: | ||
+ | [[on]] [< | ||
+ | |||
+ | ======Description: | ||
+ | This hook is triggered whenever the client receives a raw message about | ||
+ | a tcp connection established, | ||
+ | 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- | ||
+ | |||
+ | ======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 by 127.0.0.1