mIRC Home    About    Download    Register    News    Help

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

Re: scon help [Re: TheWarlock] #204485
21/09/08 09:59 PM
21/09/08 09:59 PM
Joined: Jun 2008
Posts: 48
Seattle/Tacoma Washington
T
Typos Offline
Ameglian cow
Typos  Offline
Ameglian cow
T

Joined: Jun 2008
Posts: 48
Seattle/Tacoma Washington
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.
Re: scon help [Re: Typos] #204490
21/09/08 11:39 PM
21/09/08 11:39 PM
Joined: Aug 2004
Posts: 7,252
Ontario, Canada
R
RusselB Offline
Hoopy frood
RusselB  Offline
Hoopy frood
R

Joined: Aug 2004
Posts: 7,252
Ontario, Canada
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.

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