mIRC Homepage
Posted By: TheWarlock scon help - 21/09/08 09:21 PM
hi , i want to show a server names

when i use //echo -a $scon(0) results ---> x example 5 servers

how can i do to show all the servers name?

thnx
Posted By: Typos Re: scon help - 21/09/08 09:59 PM
Code:
scon -a echo -a $!server

The scon -a means to do the command in all connections.
Using $! makes mirc process $server on each connection instead of processing it immediately and echoing that server as if all of the servers had that name.
So, this would send a message to all servers saying Hello from the server you sent the command from.
Code:
scon -a amsg Hello from everyone on $server.

And this one would say Hello to everyone on $server but the server name will be the server the message is being sent to and not the server the command was sent from.
Code:
scon -a amsg Hello to everyone on $!server.

Hope this is what you needed.
Posted By: RusselB Re: scon help - 21/09/08 11:39 PM
Personally I would recommend using the -at1 switches for the scon command, rather than just the -a switch, as using the -at1 switches will only send the message/command specified in the scon line to a connected network, rather than to all networks that have an open status window, although not necessarily connected.
Posted By: Buggs2008 Re: scon help - 21/09/08 11:51 PM
Hope this helps you out.

Code:
alias lserv { 
  var %list , %x $scon(0) , %t = %x
  while %x { 
    %list = $addtok(%list,$iif($scon(%x).network,$v1,$scon(%x).server),44) 
    dec %x 
  }
  echo $color(info) -at * $+(Servers[,%t,]:) %list
}
;Gives total and names of the Servers you are connected to. 
© mIRC Discussion Forums