mIRC Home    About    Download    Register    News    Help

Print Thread
Indentifer for multiple server windows #123630 25/06/05 06:26 PM
Joined: Jun 2005
Posts: 3
R
RavenMagneto Offline OP
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Jun 2005
Posts: 3
With the feature of mutiple servers per mIRC process, it would be nice to see a command to be able to get the list of CONNECTED servers, like $chan(%i) gets the currently joined channel(s). This would also have to be added to $chan.

For example:

$actserver(0) = number of servers connected to
$actserver(1) = equiv to current $server
$actserver(2) = second server currently connected to
$chan(1,1) = active server 1 channel 1
$chan(1,0) = number of channels joined on active server 1
$chan(2,0) = number of channels joined on active server 2

Re: Indentifer for multiple server windows #123631 25/06/05 06:33 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
You can create all of this yourself (fairly easy, too) using the /scid and /scon commands. Look them up in the help file.


New username: hixxy
Re: Indentifer for multiple server windows #123632 26/06/05 04:42 PM
Joined: Jul 2003
Posts: 77
B
bamaboy1217 Offline
Babel fish
Offline
Babel fish
B
Joined: Jul 2003
Posts: 77
it is true that you can do this all in the help file but it would be nice as well to see $chan(1,1) etc makes things easier at least :x


hmmm signed by me
Re: Indentifer for multiple server windows #123633 26/06/05 04:46 PM
Joined: Jun 2005
Posts: 3
R
RavenMagneto Offline OP
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Jun 2005
Posts: 3
Thanks for this! I got it implemented in my HTTPd now smile

Re: Indentifer for multiple server windows #123634 26/06/05 08:24 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I don't see the point in adding features to mIRC when it's almost as easy to script them.


New username: hixxy
Re: Indentifer for multiple server windows #123635 27/06/05 04:29 AM
Joined: Jul 2003
Posts: 77
B
bamaboy1217 Offline
Babel fish
Offline
Babel fish
B
Joined: Jul 2003
Posts: 77
i agree it is rather easy to script those just it seems natural with $chan and such though as you said that is just like i would personally like to see a $server(1).cid though so you can do some neet stuff with that like script something such as

$chanex(1,1)
alias chanex {
scid $server($$2).cid
; though i know this could just be
; scon $scon($$2)
; but still lol
return $chan($$1)
}


hmmm signed by me
Re: Indentifer for multiple server windows #123636 28/06/05 11:08 PM
Joined: Jun 2005
Posts: 3
R
RavenMagneto Offline OP
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Jun 2005
Posts: 3
Don't know if it will help anyone but here is a the code i built into my mIRC Webserver after being informed of scon and scid...

Code:
alias getServerData {
  %numservs = $1
  if (%numservs == 1) {
    sockwrite -nt %sockname I am currently connected to $makeServerPortLink($server,$port) as $me
    sockwrite -nt %sockname <br> $chaninfo($chan(0)) <hr>
  }
  else {
    var %i = 1
    while (%i != $calc(%numservs + 1)) {
      scon %i
      sockwrite -nt %sockname <b>Server %i Data</b>: Connected to $makeServerPortLink($server,$port) as $me $+ , on $chan(0) channels.<br>
      sockwrite -nt %sockname $chaninfo($chan(0)) <hr>
      %i = $calc(%i + 1)
    }
  }
}


this is then called from my html page: $getServerData($scon(0))

note: i dont unset the variables because the main function (on sockread) does that.