Unsaved options are reset when script is unloaded
I had a connection to a server on port 4433, but now I should use 443 instead. I tried to change matrix.server.<server>.port, and that worked fine initially. The script reloaded the connection after a few seconds without me doing anything else.
However, after I reloaded the script, it connected to 4433 and the setting was back at 4433. If I change it again and reload or unload and load the script, the same thing happens again.
Did you run /save before the reload?
Ah, right. I didn't think about that because it's not necessary for the other scripts I use. But when you mentioned it, I remembered that matrix uses its own config file, so that makes sense.
It shouldn't be necessary to have to run /save manually. E.g. autosort.py also uses it's own config section/file, and that keeps the changed values of options when you reload the script. This issue also breaks weechat.look.save_config_on_exit which works for autosort.py, but not for weechat-matrix. So I'm reopening the issue.