$server

From Scriptwiki
Revision as of 12:31, 12 April 2008 by Daveoh (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns the address of the Nth server in your irc servers list.

$server(N/address)

Properties

Property Meaning
desc returns the description of the server
port returns the port(s) of the server
group returns the group of the server
pass returns the pass of the server

Note that if you specify an IRC server address and it is in your servers list, it returns its associated info.

If N is 0, it will return the total number of servers in your serverlist.

Example

To echo everything in your serverlist, you could use the following alias:

alias showserver {
 ; lets echo a little "header"
 echo -a serveraddress - description - port - group - password
 ; lets loop through all server
 var %i = 1
 while (%i <= $server(0)) {
  ; actually echo it to the active window
  echo -a $server(%i) - $server(%i).desc - $server(%i).port - $server(%i).group - $server(%i).pass
  ; increase looping variable
  inc %i
 }
}

See Also

  • $network - Returns the name of the IRC network you are currently connected to.
  • $port - Returns the port number of the server to which you're currently connected.
  • $serverip - Returns the server IP address.