mIRC Homepage
Posted By: mIRCuserDE Closing one multi-server connection - 13/01/05 12:28 PM
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
Posted By: Iori Re: Closing one multi-server connection - 13/01/05 11:19 PM
>>> 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
Posted By: FiberOPtics Re: Closing one multi-server connection - 14/01/05 12:34 AM
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.
Posted By: mIRCuserDE Re: Closing one multi-server connection - 15/01/05 07:11 PM
@ Iori

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