On SOCKCLOSE » History » Version 1
Per Amundsen, 11/19/2015 09:53 AM
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 | <level> - The level for the event to trigger. |
||
10 | <name> - The [[$socketname]] to listen to. |
||
11 | <commands> - The commands to be performed when the event listener's criteria is met. |
||
12 | |||
13 | |||
14 | *Example* |
||
15 | |||
16 | <pre> |
||
17 | ; Open a connection to AdiIRC.com, port 80. |
||
18 | /sockopen adiirc adiirc.com 80 |
||
19 | |||
20 | ; Make a request for the index page. |
||
21 | on *:SOCKOPEN:adiirc:{ |
||
22 | sockwrite -n example1 GET / HTTP/1.0 |
||
23 | sockwrite -n example1 Host: www.adiirc.com |
||
24 | sockwrite -n example1 |
||
25 | } |
||
26 | |||
27 | on *:SOCKCLOSE:adiirc:echo -ag adiirc.com closed the connection |
||
28 | </pre> |