mIRC Home    About    Download    Register    News    Help

Print Thread
Change to favorites location #270540 21/07/22 09:53 AM
Joined: Aug 2003
Posts: 306
P
Protopia Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 306
Khaled, I know just how much you value and try to preserve backwards compatibility, so I just wanted to let you know that the following change in v7.69 caused my script to fail:

* Changed location of channels favorites to channelsini file This will allow users to update/edit this file without having to modify their mircini settings file If [chanfolder] or [chanhist] exist in mircini when mIRC starts up, they will be automatically moved to [channels] and [recent] in channelsini

My script reads the chanfolder list from $mircini and connects to servers for which autojoin is set - and (obviously) after this change it no longer works.

I can obviously code around this by checking the mirc version and using a different file and section name if 7.69 or above, but if you wish to preserve backwards compatibility for similar changes in the future, then you will need to include code in $ini and $readini to switch file and section names when file == $mircini and section == chanfolder or chanhist.


P

Re: Change to favorites location [Re: Protopia] #270547 21/07/22 07:31 PM
Joined: Dec 2002
Posts: 5,150
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,150
Alas, sometimes it just is not possible to maintain backward compatibility, especially if a script is directly reading files like mirc.ini, servers.ini, and so on.

There are times when a change has to be made to the format, eg. if a feature is being extended/updated/fixed, and there is no easy/non-convoluted way to make sure that scripts, or even older versions of mIRC, will be compatible with the change.

In this case, there were requests that the favorites be moved out of mirc.ini, and as much as I did not want to do that, I think it makes sense in the long run.

As for redirecting $ini(), $readini(), /writeini, and any other related commands/identifiers that a script might use to access mirc.ini - that is not something I would want to do. It would make the script think that a section exists in mirc.ini when it does not, with all of the subsequent issues that could lead to.