Project

General

Profile

$server » History » Revision 14

Revision 13 (Per Amundsen, 09/19/2022 12:48 AM) → Revision 14/15 (Per Amundsen, 02/23/2023 07:43 PM)

_Added in 1.8.10_ 

 *$server* 

 Returns the name of the currently connected server, otherwise [[$null]]. 

 ----------------------------------------------------------------------------- 

 _Added in 2.0_ 

 *$server(N|address,[group])* 

 Returns the address of the Nth server in the [[Serverlist_Dialog|Server List]]. 

 _Only works when using the new [[Serverlist_Dialog|Server List]]._ 

 _-1 Returns the active server, if the active server is in the new [[Serverlist_Dialog|Server List]]._ 

 *Parameters* 

 table(ktable). 
 |*Parameter*|*Description*| 
 | N<notextile>|</notextile>address | N|address - The server address to lookup, or if N = 0, number of servers, otherwise the Nth server. | 
 | [group] | - if specified, only lookup servers from this network group. | 

 *Properties* 

 table(ktable). 
 |*Property*|*Description*| 
 | .desc | - Returns the server description. | 
 | .port | -    Returns the server port(s). | 
 | .group | - Returns the server network group. | 
 | .pass | - Returns the server password. | 
 | .ssl | - Returns [[$true]] if SSL is enabled, otherwise [[$false]]. *(AdiIRC only)* | 
 | .tls | - Returns [[$true]] if STARTTLS is enabled, otherwise [[$false]]. *(AdiIRC only)* | 
 | .mnick | - Returns the main/default nick for this server. *(AdiIRC only)* | 
 | .method | - Returns the [[login method]]. | 
 | .methodpass | - Returns the login method password. | 
 | .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 | 
 | .key | - Returns the private "SSL/TLS":https://en.wikipedia.org/wiki/Transport_Layer_Security client client certificate filename. | 
 | .itype | - Always returns "local". | 
 | .nick | - Returns the main/default nick for this server. | 
 | .anick | - Returns the first preferred alternative nick for this server. | 
 | .email | - Returns [[Server_Options#Ident-Nick<notextile>|</notextile>Ident [[Server_Options#Ident-Nick|Ident Nick]]@adiirc.com. | 
 | .user | - Returns the username for this server. | 
 | .encoding | - Returns the encoding used for this server. | 

 *Example* 

 <pre> 
 //echo -ag There is $server(0) servers in your server list. 

 //echo -ag The first server in your server list is $server(1) $server(1).port 

 //echo -ag Libera.Chat $iif($server(irc.libera.chat),is,is not) in your server list. 
 </pre>