mIRC Home    About    Download    Register    News    Help

Print Thread
#204482 21/09/08 09:21 PM
Joined: Nov 2007
Posts: 117
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2007
Posts: 117
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

TheWarlock #204485 21/09/08 09:59 PM
Joined: Jun 2008
Posts: 48
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Jun 2008
Posts: 48
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.


I've gone to look for myself. If I should return before I get back, please keep me here.
Typos #204490 21/09/08 11:39 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

TheWarlock #204491 21/09/08 11:51 PM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
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. 


Link Copied to Clipboard