mIRC Home    About    Download    Register    News    Help

Print Thread
Connected servers #237743 31/05/12 08:54 AM
Joined: Jul 2006
Posts: 11
S
setsukun Offline OP
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?

Re: Connected servers [Re: setsukun] #237744 31/05/12 09:49 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
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,.) }
Re: Connected servers [Re: sparta] #237758 01/06/12 05:25 PM
Joined: Jul 2006
Posts: 11
S
setsukun Offline OP
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.

Re: Connected servers [Re: setsukun] #237760 01/06/12 05:40 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
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,.) }
Re: Connected servers [Re: sparta] #237764 01/06/12 11:42 PM
Joined: Jul 2006
Posts: 11
S
setsukun Offline OP
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.
Re: Connected servers [Re: setsukun] #237765 01/06/12 11:52 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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.

Re: Connected servers [Re: Tomao] #237766 02/06/12 03:22 AM
Joined: Jan 2004
Posts: 1,273
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,273
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.
Re: Connected servers [Re: Loki12583] #237787 03/06/12 03:23 AM
Joined: Jul 2006
Posts: 11
S
setsukun Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 11
Thank you, Loki. Exactly what I needed.