mIRC Homepage

multi-server is poo :(

Posted By: absTrusE

multi-server is poo :( - 12/12/02 06:47 AM

It is WAY too easy to break scripts that are designed to work over multiple servers. Scenario: say you want to measure lag, but you want to implement support to choose which server to monitor for users who use multiple servers. say the user selects '1'. the lag meter happily measures lag, no problem. but say they then open a new window, which is assigned a connection ID of 2, and then close the first window. effectively, the new window becomes the first connection, but retains the connection id of '2'. The script then cannot find the server it is trying to monitor, and poops itself frown

I would LOVE to see a command to CHANGE the connection ID for a server. it would be a simple matter to script a fix for these kinds of bugs, as users could monitor status windows using on *:CLOSE , and then change the connection id's suitably.

Either that, or dynamically update connection id's as needed: ie if user closed window 3, any servers after that have -1 taken from their connection id's.
Posted By: absTrusE

Re: multi-server is poo :( - 12/12/02 07:19 AM

oh, don't mind me, im a moron - just realised u can use $scon in scripts instead of $scid to fix this lol.

but a command to change the CID would still be nice ;p
Posted By: Merlin

Re: multi-server is poo :( - 12/12/02 07:21 AM

For information how to use Connection Id's visit Cobra^'s CID Tutorial at http://www.mishscript.de/help/cid.htm smile
Posted By: absTrusE

Re: multi-server is poo :( - 12/12/02 08:30 AM

cheers Merlin, a few useful tricks, but it would still be nice to be able to change the name of a connection id. if the $scon identifier is used to return connection numbers, i dont see why connection ID necessarily has to be numerical, especially when it is not necessarily accurate as above :P
if mIRC itself uses the connection id to do whatever it does, perhaps there should be a $cname identifier? and a /cname command to change it. Would be useful for a few scripts smile
Posted By: NaquadaServ

Re: multi-server is poo :( - 12/12/02 08:52 AM

I feel this whole connection ID stuff is a bunch of crap... Each connection should act on it's own, it's own timers, it's own windows with the same name as another window on a different connection, etc... No cross over anywhere (except /server)... Then all the scripts that worked fine for mirc 5.91 would still be working fine....
Posted By: tymonk

Re: multi-server is poo :( - 12/12/02 02:06 PM

i mentioned in another thread that an $con be added to compliment the $cid . Would make life a little easier.
no response needed ....i know work arounds are there...
Posted By: Larra

Re: multi-server is poo :( - 12/12/02 10:58 PM

you can use $scon(n).cid
Posted By: Cobra

Re: multi-server is poo :( - 13/12/02 09:58 PM

First. IF the lag detector was coded right .. it would monitor lag on all connected connections anyways and display the lag for the active one like mine does :P

second there is absolutly NO reason we need any ability to change the CID

this must remain a defined value uncahngable, to have it be changable by the end user or a script would cause more problems then it would prevent, think about it, we would no longer have a constant to identify a connection, some scripts depend on that.

i've done ALOT of codeing with the CID, and there has NEVER been any problems in geting scripts to work fully featured accross multipal connections.

if your having a problem with one thing or anouther ask in the scripting help section and we will be happy to assist you smile

as long as you understand the difference and realize how to utalize scon and scid both you can make your scripts work very nicely with no complications,

realy if you think about it .. the move of mIRC to multi server was a HUGE jump .. most ppl are shocked the scripting langauge didnt change all together .. the creation of CID was a greal way to alow the new multi server feature to not break existing scripts or change the language all together .. and you say its poo ? lol

anyways :P

© 2022 mIRC Discussion Forums