Thanks for your post. The issues you mention are related to historical and Windows INI API backward-compatiblity.

For issues A and C: when the custom INI routines were implemented, I decided to make them as compatible as possible with the Windows INI APIs, to ensure that newer versions of mIRC would continue to work with previous INI files. This meant trying to mimick the same issues as the Windows INI APIs to avoid breaking scripts.

For issue B: $readini was originally a non-bracketed() identifier, so its parameters had to be enclosed in quotes. When $readini() was added, it shared the same core code as $readini, to make sure that they worked in the same way. Fixing this issue is not possible, as far as I can see, because the non-bracketed /writeini has to parse quotes across parameters whereas the bracketed $readini() does not.

As for comments: I could add a check to prevent duplicate comments in a section, which I believe would make it different from the Windows INI API. That said, it's possible that some scripts may try to write a comment, then an item, then another coment, then an item, and that some of the comments above each item might be the same. In which case, such a change would prevent this. So perhaps the change should prevent multiple *consecutive* identical comments.

As for equal signs in item names: the only workable solution to this is to prevent item names from containing equal signs, and reporting an error if a script tries to do this in either /writeini or $readini(), which would break all existing scripts where this currently works.

For the caching issue: this needs to be fixed and will be in the next beta. The fix means that if an item name begins with an equal sign, /writeini will have to report an error, since technically there will be no item name.