Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
32
bitchx-docs/5_Programming/on/dcc_raw
Normal file
32
bitchx-docs/5_Programming/on/dcc_raw
Normal file
@@ -0,0 +1,32 @@
|
||||
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().
|
||||
Raw messages are sent across established tcp connections with DCC 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())
|
||||
$1 host connected to (hostname or ip address)
|
||||
$2 code for connection type:
|
||||
c - socket was closed
|
||||
d - incoming data
|
||||
e - issued when $connect() returns successfully
|
||||
n - connection accepted on a port the client is listening to
|
||||
$3- data for type 'd', port number for types 'e' and 'n', none for 'c'
|
||||
|
||||
Examples:
|
||||
To display all successful socket connections:
|
||||
on #-dcc_raw 10 "% % e %" {
|
||||
echo *** Connection with $1 on port $3 \(fd: $0\)
|
||||
}
|
||||
|
||||
See Also:
|
||||
connect(6); dcc(1) raw; listen(6)
|
||||
|
||||
Reference in New Issue
Block a user