xmpp config file not saved
Is the config save procedure implemented ? When I hit /save xmpp I get Error writing configuration file "xmpp.conf". The file is read/writeable and accessible, I can save other plugin options.
Also I hade to remove -fuse-ld=mold from LDFLAGS to be able to compile, I wonder if this can be the cause.
sorry, i havent ignored this, i just haven't gotten around to checking. also, i will remove fuse-ld in my next commit
Ok thanks for this plugin
any update on that? Looks like it is still an issue.
@blob42 can you pls re-open this?
@bqv I have had a quick look at it, one thing that is definitely wrong is that in
https://github.com/bqv/weechat-xmpp/blob/e14d928aefa9b2b95c5a0f76eb16e65bf84be895/config.cpp#L149
it should definitely be file.write() instead of file.read(), this does however not fix it still.
tbh I cant make heads or tails or how to get through the code, I will try over the coming time and mess about with it to see if I can get it so save but nothing checks out yet. it seems the most that somewhere its putting a wrong return code that just makes weechat say its not saving. did this ever work post all the cpp refacturing?
so far checked:
- previously mentioned correciton does not fix anything
- content coming through account_write_cb is valid
- account_write_cb gets to the return WEECHAT_CONFIG_WRITE_OK part without issues
even if you dont feel like fixing it or looking at it any pointer would be helpful, no one is helping me in weechat either as for any reason why plugins cause this failure to save behaviour, and it being cpp is really not helping me get any further quickly either its all very indirect and abstract use of the weechat api calls
after some messing around, I managed to mess up internals enough to the point it threw a WEECHAT_CONFIG_WRITE_ERROR, which then caused some values to be saved correctly. this led me to trace back and find that it makes a boolean from these and then incorrectly translates it back to the return codes. both fixed in pr.
I think I'll throw together all my bodged fixes in a branch on my fork in case it'll take a while for maintainer to notice
I don't imagine this is actually fixed; from what I remember, this was a pretty messy situation..
for the record this does fix it and lets you save and reload again. its just a bit odd how it falls together now. also pretty sure it returns a function thats a void in weechat api docs at some point
sweet thanks @Ckath I can finally use weechat with xmpp