On SOCKCLOSE » History » Version 5
Per Amundsen, 02/24/2017 09:37 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *<notextile>on <level>:SOCKCLOSE:name:<commands></notextile>* |
||
4 | |||
5 | Triggers when a connection is closed by the remote connection. (not by [[/sockclose]]) |
||
6 | |||
7 | *Parameters* |
||
8 | |||
9 | 5 | Per Amundsen | <level> - The [[User Access Level]] for the event to trigger. |
10 | 3 | Per Amundsen | <name> - The [[$sockname]] to listen to. |
11 | 1 | Per Amundsen | <commands> - The commands to be performed when the event listener's criteria is met. |
12 | |||
13 | 3 | Per Amundsen | _See also [[on SOCKLISTEN]], [[on SOCKCLOSE]], [[on SOCKREAD]], [[on SOCKWRITE]], [[/socklisten]], [[/sockopen]], [[/sockaccept]], [[$sock]], [[$sockbr]], [[$sockerr]], [[$sockname]]._ |
14 | 1 | Per Amundsen | |
15 | *Example* |
||
16 | |||
17 | <pre> |
||
18 | ; Open a connection to AdiIRC.com, port 80. |
||
19 | /sockopen adiirc adiirc.com 80 |
||
20 | |||
21 | ; Make a request for the index page. |
||
22 | on *:SOCKOPEN:adiirc:{ |
||
23 | 4 | Per Amundsen | sockwrite -n adiirc GET / HTTP/1.0 |
24 | sockwrite -n adiirc Host: www.adiirc.com |
||
25 | sockwrite -n adiirc |
||
26 | 1 | Per Amundsen | } |
27 | |||
28 | on *:SOCKCLOSE:adiirc:echo -ag adiirc.com closed the connection |
||
29 | </pre> |