$server » History » Version 13
Per Amundsen, 09/19/2022 12:48 AM
| 1 | 1 | Per Amundsen | _Added in 1.8.10_ |
|---|---|---|---|
| 2 | |||
| 3 | *$server* |
||
| 4 | |||
| 5 | Returns the name of the currently connected server, otherwise [[$null]]. |
||
| 6 | |||
| 7 | ----------------------------------------------------------------------------- |
||
| 8 | |||
| 9 | 3 | Per Amundsen | _Added in 2.0_ |
| 10 | |||
| 11 | 1 | Per Amundsen | *$server(N|address,[group])* |
| 12 | |||
| 13 | 12 | Per Amundsen | Returns the address of the Nth server in the [[Serverlist_Dialog|Server List]]. |
| 14 | 1 | Per Amundsen | |
| 15 | 12 | Per Amundsen | _Only works when using the new [[Serverlist_Dialog|Server List]]._ |
| 16 | |||
| 17 | _-1 Returns the active server, if the active server is in the new [[Serverlist_Dialog|Server List]]._ |
||
| 18 | 3 | Per Amundsen | |
| 19 | *Parameters* |
||
| 20 | |||
| 21 | N|address - The server address to lookup, or if N = 0, number of servers, otherwise the Nth server. |
||
| 22 | [group] - if specified, only lookup servers from this network group. |
||
| 23 | |||
| 24 | *Properties* |
||
| 25 | |||
| 26 | .desc - Returns the server description. |
||
| 27 | .port - Returns the server port(s). |
||
| 28 | .group - Returns the server network group. |
||
| 29 | .pass - Returns the server password. |
||
| 30 | 7 | Per Amundsen | .ssl - Returns [[$true]] if SSL is enabled, otherwise [[$false]]. *(AdiIRC only)* |
| 31 | 8 | Per Amundsen | .tls - Returns [[$true]] if STARTTLS is enabled, otherwise [[$false]]. *(AdiIRC only)* |
| 32 | 10 | Per Amundsen | .mnick - Returns the main/default nick for this server. *(AdiIRC only)* |
| 33 | 4 | Per Amundsen | .method - Returns the [[login method]]. |
| 34 | 6 | Per Amundsen | .methodpass - Returns the login method password. |
| 35 | 13 | Per Amundsen | .keytype - Returns "global" or "local" depending on whether the server is using a custom "SSL/TLS":https://en.wikipedia.org/wiki/Transport_Layer_Security client certificate |
| 36 | .key - Returns the private "SSL/TLS":https://en.wikipedia.org/wiki/Transport_Layer_Security client client certificate filename. |
||
| 37 | .itype - Always returns "local". |
||
| 38 | .nick - Returns the main/default nick for this server. |
||
| 39 | .anick - Returns the first preferred alternative nick for this server. |
||
| 40 | .email - Returns [[Server_Options#Ident-Nick|Ident Nick]]@adiirc.com. |
||
| 41 | .user - Returns the username for this server. |
||
| 42 | .encoding - Returns the encoding used for this server. |
||
| 43 | 3 | Per Amundsen | |
| 44 | *Example* |
||
| 45 | |||
| 46 | <pre> |
||
| 47 | //echo -ag There is $server(0) servers in your server list. |
||
| 48 | |||
| 49 | //echo -ag The first server in your server list is $server(1) $server(1).port |
||
| 50 | |||
| 51 | 11 | Per Amundsen | //echo -ag Libera.Chat $iif($server(irc.libera.chat),is,is not) in your server list. |
| 52 | 3 | Per Amundsen | </pre> |