weechat-matrix icon indicating copy to clipboard operation
weechat-matrix copied to clipboard

Unsaved options are reset when script is unloaded

Open trygveaa opened this issue 5 years ago • 3 comments

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.

trygveaa avatar Jan 09 '20 00:01 trygveaa

Did you run /save before the reload?

poljar avatar Jan 09 '20 08:01 poljar

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.

trygveaa avatar Jan 09 '20 09:01 trygveaa

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.

trygveaa avatar Apr 12 '21 20:04 trygveaa