#1485 Indeterminate order of chanopt.conf entries

open
nobody
None
5
2010-10-08
2010-10-08
Adrian Petrescu
No

The entries of the channels in chanopt.conf seems to be essentially random and (because of the fact that X-Chat re-writes all of its configuration files on exit even when nothing in them has changed) this means that the chanopt.conf file is almost guaranteed to change every time X-Chat is exited, no matter what happened during the session. For people who backup their configuration files (especially versioned ones like git), this is a real annoyance.

I've attached a file showing the diff between two chanopt.conf files from before and after a session in which *nothing* was done (basically I just started up X-Chat, waited for the connection to be established, and closed it again). As you can see, the order of the channels has been shuffled around needlessly.

The fix is extremely simple; the code in chanopt.c needs to be tweaked slightly to output the entries in some static order (like, say, alphabetically by channel name) rather than by whatever it is doing now (maybe the order in which they were joined?). I can't imagine that being very difficult -- if you guys want, I'll submit a patch for it.

Discussion

  • chanopt.conf diff before and after a short X-Chat session

     
    Attachments