mIRC Home    About    Download    Register    News    Help

Print Thread
#185359 08/09/07 10:43 PM
M
Miyako
Miyako
M
Hi! I made a custom treebar using MDX and some docking-options. My problem is, it was working with $cid to recognize the server.
It seems that $cid is malfunctioning with mIRC 6.3.
If I use $cid on a server, it's telling me it's number 29!!! And I'm only connected to 4 servers, there are also only 4 status windows open.
So I was curious and tried: //echo -a $scid(1..25).$server
The results:
1: irc.4chat.be
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
15:
16:
17:
18:
19:
20:
21:
22:
23: irc.totov.ath.cx
24:
25:
26: irc.chattersweb.nl
27:
28:
29: nexus.ircworld.nl

You can see that the 4 servers are there, but with MUCH empty $server's smile
In mIRC 6.21 it wasn't, and I searched in the whatisnew.txt for updates, but I can't find something related to $cid.

Regards,


Miyako

#185360 08/09/07 10:45 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
CIDs are not supposed to be in any particular order - they are connection IDs. An ID is usually a unique identifier to identify something, hence the name ID.

Whilst the behaviour may have changed, connection IDs were never supposed to be in any particular order. To do what you want, use $scon() instead of $scid()

M
Miyako
Miyako
M
how can I return the active ID of $scon and what are all those empty ID's?

#185365 08/09/07 10:57 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
They're not empty. $scid() takes a connection ID as a parameter, and connection IDs are not in the order of 1, 2, 3, etc. $scon() however, does accept numbers in that order.. $scon(1) is the first server, $scon(2) the second, etc.

$cid is the active connection ID.

#185366 08/09/07 10:58 PM
Joined: Apr 2004
Posts: 755
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 755
Hey Miyako ltns smile

$scid is a unique identifier each time you open a new status(server) window. $scon(N) is the collection of all the open scids so $scon(1) returns the first scid $scon(2) the 2nd and so on.

M
Miyako
Miyako
M
Originally Posted By: Mpdreamz
Hey Miyako ltns smile

$scid is a unique identifier each time you open a new status(server) window. $scon(N) is the collection of all the open scids so $scon(1) returns the first scid $scon(2) the 2nd and so on.

I know the difference between $scon and $scid, but my question to you: Why do I have 29 ID's while I have 4 server windows (connected or not) open wink That's why I think it's a bug.
I have to use $cid in my treebar because else I can't open the server windows which aren't connected.

I'll try to show you there is a bug, normally I can make a window in each cid, I suppose (because I don't have to be connected to make a @window).

If I try: /scid 29 /window -a @test I can see it, but if I try: /scid 28 /window -a @test the result is:
* No such connection id: 28

I neither opened 29 status windows and closed ID 28 (so it can't be that).

But OK, I have fixed it in my own script using $scon (now I can't activate windows on server windows which aren't connected, but OK).

Last edited by Miyako; 08/09/07 11:06 PM.
#185372 08/09/07 11:08 PM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
You might use $activecid or $scon(N).cid

M
Miyako
Miyako
M
Originally Posted By: Horstl
You might use $scon(N).cid

Correct, then I can return the ID's from the connected servers, but still I don't understand the 29 ID's while I opened 4 status windows wink Or is it randomly? XD

Last edited by Miyako; 08/09/07 11:10 PM.
#185374 08/09/07 11:16 PM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
I think it's not "randomly" but better treat it like being random.
I suppose e.g. every new connection attempt increases the cid value (got a LOT failed reconnection attempts these days, and one recent connection had a cid value > 1000).

M
Miyako
Miyako
M
Originally Posted By: Horstl
I think it's not "randomly" but better treat it like being random.
I suppose e.g. every new connection attempt increases the cid value (got a LOT failed reconnection attempts these days, and one recent connection had a cid value > 1000).

That could be possible, too lazy to count my reconnects. But in early versions it wasn't counting like this (I know because my treebar worked perfectly :P)

Btw, sorry.. I think I posted it in the wrong subforum, maybe it could be moved to bugs? (unless I'm wrong)

Last edited by Miyako; 08/09/07 11:24 PM.
#185376 08/09/07 11:26 PM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
It's been reported and explained here

M
Miyako
Miyako
M
Originally Posted By: Horstl
It's been reported and explained here

Haha, it explains a lot :P But it's annoying they changed the ID-counting-thing, too bad :P


Link Copied to Clipboard