Project

General

Profile

$server » History » Version 15

Per Amundsen, 02/23/2023 07:43 PM

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 15 Per Amundsen
_See also [[/server]]._
20
21 3 Per Amundsen
*Parameters*
22
23 14 Per Amundsen
table(ktable).
24
|*Parameter*|*Description*|
25
| N<notextile>|</notextile>address | The server address to lookup, or if N = 0, number of servers, otherwise the Nth server. |
26
| [group] | if specified, only lookup servers from this network group. |
27 1 Per Amundsen
28
*Properties*
29
30 14 Per Amundsen
table(ktable).
31
|*Property*|*Description*|
32
| .desc | Returns the server description. |
33
| .port |  Returns the server port(s). |
34
| .group | Returns the server network group. |
35
| .pass | Returns the server password. |
36
| .ssl | Returns [[$true]] if SSL is enabled, otherwise [[$false]]. *(AdiIRC only)* |
37
| .tls | Returns [[$true]] if STARTTLS is enabled, otherwise [[$false]]. *(AdiIRC only)* |
38
| .mnick | Returns the main/default nick for this server. *(AdiIRC only)* |
39
| .method | Returns the [[login method]]. |
40
| .methodpass | Returns the login method password. |
41
| .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 |
42
| .key | Returns the private "SSL/TLS":https://en.wikipedia.org/wiki/Transport_Layer_Security client client certificate filename. |
43
| .itype | Always returns "local". |
44
| .nick | Returns the main/default nick for this server. |
45
| .anick | Returns the first preferred alternative nick for this server. |
46
| .email | Returns [[Server_Options#Ident-Nick<notextile>|</notextile>Ident Nick]]@adiirc.com. |
47
| .user | Returns the username for this server. |
48
| .encoding | Returns the encoding used for this server. |
49 3 Per Amundsen
50
*Example*
51
52
<pre>
53
//echo -ag There is $server(0) servers in your server list.
54
55
//echo -ag The first server in your server list is $server(1) $server(1).port
56
57 11 Per Amundsen
//echo -ag Libera.Chat $iif($server(irc.libera.chat),is,is not) in your server list.
58 3 Per Amundsen
</pre>