mIRC Home    About    Download    Register    News    Help

Print Thread
#237743 31/05/12 08:54 AM
Joined: Jul 2006
Posts: 11
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 11
I'm trying to list/get info on the servers I'm connected to. Is there a token for this?

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Some of the servers dont allow list, it can only be used true the servers own www page, so use google to find the page, then see if they have any list funktions there.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jul 2006
Posts: 11
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 11
I meant the servers I'm connected to. Not the list of servers on a network.

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
//echo -a $server <- give you the server name.

//echo -a $network <- give you the network name.

If that dont work, then you have a alias that messing things up for you..

//echo -a !$server


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jul 2006
Posts: 11
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 11
..... I know about those, anyway. What I'm trying to do is list ALL the servers I'm connected to, not just the one that is active when I execute the script.

Last edited by setsukun; 01/06/12 11:43 PM.
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
According to mIRC help file:
Quote:
$server(N/address)

Returns the address of the Nth server in your irc servers list.
Properties: desc, port, group, pass

$server(0) returns the total number of servers in the servers list

$server(2) returns the address of the 2nd server

$server(2).desc returns the description of the 2nd server

$server(3).port returns the port(s) of the 3rd server

If you specify an irc server address and it is in your servers list, it returns its associated info.
You can then use a while loop with $server() to list all the servers you're connected to.

Tomao #237766 02/06/12 03:22 AM
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
That's not what he wants either. You can loop through $scon

Code:
var %i = 1, %n = $scon(0)
while (%i <= %n) {
  scon %i
  echo -ag $server
  inc %i
}

Last edited by Loki12583; 02/06/12 03:32 AM.
Joined: Jul 2006
Posts: 11
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 11
Thank you, Loki. Exactly what I needed.


Link Copied to Clipboard