$server

From Scriptwiki
Revision as of 10:19, 2 July 2007 by Cail (talk | contribs)

Jump to: navigation, search

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

$server(N/address)


$server has the following 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