mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2005
Posts: 3
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jan 2005
Posts: 3
Hi

I connect to different servers per script / command line. Sometimes i connect to server1 & server3 ... sometimes to server3 & server2 & server1 ... sometime to server5 (not $server).

Now i need a status-list of all connections ... connect, connected, disconnected ... and server-name / -port & status window title.

Last i want quit / disconnect one of the connections (eg server2) and close the status-window of the connection ... but i only know server-name and port-range.

How i have to do this?

mIRCuDE

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
>>> Now i need a status-list of all connections ... connect, connected, disconnected ... and server-name / -port & status window title.
Code:
; /vstatus
 
alias vstatus { set -u %_status 1 | scon -a _status }
alias -l _vstatus {
  echo -atic info $+(%_status,: $status $iif($server,$+($v1,:,$port))) - $window(status window).title
  inc %_status
}


>>> quit / disconnect one of the connections (eg server2) and close the status-window of the connection ... but i only know server-name and port-range.
Code:
; /selquit <servername> [reason]
; /selquit <network> [reason]
 
alias selquit {
  scid $$findcid($$1)
  quit $2-
  window -c "Status Wwindow"
}
alias findcid var %a | scon -at1 if $1 == $!network || $1 == $!server $({ var %a = $cid },0) | return %a

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi Iori,

got a little typo there in "scon -a _vstatus". Hehe this time I didn't just spot it, but noticed when I tried the code and got an error.

Btw, instead of set -u and call a second alias, you could do something like:

alias vstatus var %a | scon -a inc $(%a |,) echo -atic ...

But I suppose that's a personal choice.

Anyway, cya later.

EDIT: Had a typo myself there, lol.

Last edited by FiberOPtics; 14/01/05 12:47 AM.

Gone.
Joined: Jan 2005
Posts: 3
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jan 2005
Posts: 3
@ Iori

Thx a lot ! I dont understand most parts of your code ^^ ... but i'll test it now.


Link Copied to Clipboard