From WikiChip
Difference between revisions of "mirc/identifiers/$server"
m |
(Additional (undocumented) properties) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{mirc title|$server identifier}}'''$server''' | + | {{mirc title|$server identifier}}'''$server''' can be used to return the current server name if you don't provide any parameter, or informations about servers in your IRC server list if you provide one. You can use $server(-1) to get informations about the current connection without relying on the server list |
== Synopsis == | == Synopsis == | ||
− | <pre>$server</pre> | + | <pre>$server |
+ | $server(N/address,[group]) | ||
+ | </pre> | ||
== Parameters == | == Parameters == | ||
− | + | * '''N/address''' - references the Nth server or use the name you provided, if N = 0, returns total number of server. If N = -1, it identifies the current connection | |
+ | * '''[group]''' - If you specify a group name, returns only servers for that group | ||
== Properties == | == Properties == | ||
− | * '''.method''' - login method (used in conjunction with {{mirc|/server|/server -l}}) | + | If parameters are used, you can use the following properties: |
+ | * '''.desc''' - returns the description of that server (returns Random server if N = -1 and you're not connecting using the server list) | ||
+ | * '''.pass''' - returns the server password | ||
+ | * '''.port''' - returns the port parameter (same as $port if you're not using the server list) | ||
+ | * '''.group''' - returns the group name (returns the $network value if N = -1 and you're not connecting using the server list) | ||
+ | * '''.method''' - returns the login method (used in conjunction with {{mirc|/server|/server -l}}) | ||
+ | * '''.methodpass''' - returns the password associated with the login method | ||
+ | * '''.keytype''' - returns the type/mode of the SSL certificate, "global" or "local", depending on if you're using the global certificate or a specific certificate | ||
+ | * '''.key''' - returns the the private certificate filename for SSL | ||
+ | * '''.itype''' - returns the type/mode of the user informations, "global" or "local", depending on if you're using the global user infos (nick, email, ident etc) or specific infos per server (via /server -i or by editing the server list) | ||
+ | * '''.nick''' - return the nickname associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i | ||
+ | * '''.anick''' - return the alternative nickname associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i | ||
+ | * '''.email''' - return the email address associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i | ||
+ | * '''.user''' - return the username associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i | ||
+ | * '''.encoding''' - return the encoding's ID associated with the connection (editing server list or /server -i), return 0 if you connect without the server list and without /server -encoding | ||
+ | * '''.connect''' - returns $true if the Other tab in the server definition has the "Connect to server" checkbox ticked, otherwise returns $false. | ||
+ | * '''.minimize''' - returns $true if the Other tab in the server definition has the "Minimize window" checkbox ticked, otherwise returns $false. | ||
== Examples == | == Examples == | ||
Echo the active connection's server to the active window''' | Echo the active connection's server to the active window''' | ||
<pre>//echo -a $server</pre> | <pre>//echo -a $server</pre> | ||
+ | |||
+ | Echo the number of Dalnet servers in the server list to the active window''' | ||
+ | <pre>//echo -a $server(0,Dalnet)</pre> | ||
+ | |||
+ | Echo the domain name of the first server in the Dalnet group in the server list to the active window''' | ||
+ | <pre>//echo -a $server(1,Dalnet)</pre> | ||
== Compatibility == | == Compatibility == | ||
Line 18: | Line 43: | ||
== See Also == | == See Also == | ||
− | * {{mIRC| | + | * {{mIRC|/server}} |
− | |||
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
[[Category:mIRC identifiers|server]] | [[Category:mIRC identifiers|server]] |
Latest revision as of 16:47, 31 January 2024
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$server can be used to return the current server name if you don't provide any parameter, or informations about servers in your IRC server list if you provide one. You can use $server(-1) to get informations about the current connection without relying on the server list
Synopsis[edit]
$server $server(N/address,[group])
Parameters[edit]
- N/address - references the Nth server or use the name you provided, if N = 0, returns total number of server. If N = -1, it identifies the current connection
- [group] - If you specify a group name, returns only servers for that group
Properties[edit]
If parameters are used, you can use the following properties:
- .desc - returns the description of that server (returns Random server if N = -1 and you're not connecting using the server list)
- .pass - returns the server password
- .port - returns the port parameter (same as $port if you're not using the server list)
- .group - returns the group name (returns the $network value if N = -1 and you're not connecting using the server list)
- .method - returns the login method (used in conjunction with /server -l)
- .methodpass - returns the password associated with the login method
- .keytype - returns the type/mode of the SSL certificate, "global" or "local", depending on if you're using the global certificate or a specific certificate
- .key - returns the the private certificate filename for SSL
- .itype - returns the type/mode of the user informations, "global" or "local", depending on if you're using the global user infos (nick, email, ident etc) or specific infos per server (via /server -i or by editing the server list)
- .nick - return the nickname associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i
- .anick - return the alternative nickname associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i
- .email - return the email address associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i
- .user - return the username associated with the connection (editing server list or /server -i), return $null if you connect without the server list and without /server -i
- .encoding - return the encoding's ID associated with the connection (editing server list or /server -i), return 0 if you connect without the server list and without /server -encoding
- .connect - returns $true if the Other tab in the server definition has the "Connect to server" checkbox ticked, otherwise returns $false.
- .minimize - returns $true if the Other tab in the server definition has the "Minimize window" checkbox ticked, otherwise returns $false.
Examples[edit]
Echo the active connection's server to the active window
//echo -a $server
Echo the number of Dalnet servers in the server list to the active window
//echo -a $server(0,Dalnet)
Echo the domain name of the first server in the Dalnet group in the server list to the active window
//echo -a $server(1,Dalnet)
Compatibility[edit]
Added: mIRC v3.5
Added on: 07 Aug 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See Also[edit]
mIRC identifier list