mIRC Home    About    Download    Register    News    Help

Print Thread
scon bugs #81989 05/05/04 03:33 PM
Joined: Dec 2002
Posts: 29
C
Charlie Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Dec 2002
Posts: 29
there is a bug with scon, when you have two or more connection (multi-server). where one of connection id are greater than 11.

Code:
how to re-produce:
1. run your mIRC ;)
2. //var %x 1 | while (%x <= 15) { sockopen %x localhost 80 | sockclose %x | inc %x }
   note: it will make it faster to reach connection id greater than 11
3. open new server window (do not connect it), ie: /server -n irc.dal.net
4.  back to first connection id (ALT + 1)
5. //scon $scon(1) echo -s ::: scon test $scon(1)
6. //scon $scon(2) echo -s ::: scon test $scon(2)
   as result, you may get following error: * No such connection id: 16
7. but the correct connection id should be 18, //echo -a ::: $scon(2)


Charlie
Re: scon bugs #81990 05/05/04 04:40 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline
Fjord artisan
Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
you have to use /scid not /scon
/help /scid

Re: scon bugs #81991 06/05/04 11:12 AM
Joined: Dec 2002
Posts: 29
C
Charlie Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Dec 2002
Posts: 29
sure, i know about that command, but inside mIRC help there stand:

Quote:

/scid <-rsatM | N> [command]
Changes the active connection for a script to connection id N, where N is a $cid value.
...
The /scon command works in exactly the same way, except that N represents the Nth connection, not a connection id value.


so, where is the bug? mIRC help file or mIRC it self?


Charlie
Re: scon bugs #81992 06/05/04 11:49 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The mistake is on your end. Both $scon(N) and $scid(N) return a connection ID. So, both identifiers can be used with /scid but NEITHER with /scon. That's because /scon does not accept an ID but a number representing the Nth connection.

However, there seems to be a minor bug in mirc regarding the /scon error message. For example,
//scon $calc($scon(0) + 1) echo -s test
gives
-
* No such connection id: 1
-

The message is incorrect, since /scon doesn't accept an ID to begin with. It should probably say something like
-
* No such connection: <value of $calc($scon(0) + 1)>
-


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: scon bugs #81993 06/05/04 01:38 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Although this isn't related to the alleged bug, it does seem bug-like that $scid() returns an ID instead of a connection number, after all what good is an identifier that gives you the same value you inputted. In it's current state $scid() is useless except that it can tell you whether $scid(N) exists, but it could still retain that functionality and return a connection number so I don't get why it doesn't.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: scon bugs #81994 06/05/04 01:58 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
I suppose $scid(N) is only useful when a property is specified too, eg $scid(3).me is an easy way to get your nick in the connection with ID = 3. But I agree with your suggestion, I would prefer $scid(3) to return the index of the connection with ID = 3.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: scon bugs #81995 07/05/04 07:51 AM
Joined: Dec 2002
Posts: 29
C
Charlie Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Dec 2002
Posts: 29
i prefer to use $scon(n).me, so i'm sure that its n active connection (server window) and not just n connection id.
it useful, when you close the 3rd connection id, and make new one so you still have 3 connection to three different server


Charlie
Re: scon bugs #81996 07/05/04 01:25 PM
Joined: Oct 2003
Posts: 214
S
Sephiroth_ Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
replace your //scon $scon(2) with //scid $scon(2) - because $scon(N) returns the same as $cid

or you remove $scon() and use only the number there

/scid and /scon are both needed

Last edited by Sephiroth_; 07/05/04 01:26 PM.

one step closer to world domination