mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 122
S
STING Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 122
Is there an easy way to determine if at least one server window has an active connection, without using a while loop?

So for example, if my active window is a Status window of a disconnected server, but my other Status window is connected.

Before the multi-server age I just would use $server, but that of course isn't enough wink

Now using a variable, which increases ON CONNECT and decreases ON DISCONNECT.

Thanks!

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Code:
; $connectcount returns the No. of currently connected status windows
alias connectcount {
  var %n = 0 
  scon -at1 inc % $+ n
  return %n
}



Joined: Dec 2002
Posts: 122
S
STING Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 122
Ah, of course, thanks smile


Link Copied to Clipboard