mIRC Homepage
Posted By: Protopia Change to favorites location - 21/07/22 09:53 AM
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
Posted By: Khaled Re: Change to favorites location - 21/07/22 07:31 PM
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.
© mIRC Discussion Forums