Multiple account support
Like Jabber, Matrix allows it and probably even assumes it =)
This is on my list of things that would be nice, and it's doable, but no plans to implement currently.
I think the work to support this consists mostly of making sure no globals are abused to store account-local information, and that the findroom-mechanisms always finds the correct account. And also have settings/configuration to support it. Maybe a new configuration file would be needed to make the user experience nice for this.
BTW I tried to rename plugin and then to change:
local SCRIPT_NAME = "othermatrix"
It saved its config correctly with othermatrix name, but failed to execute /othermatrix connect, so some globals are likely used here =)
That's an interesting workaround which should have worked! I tested locally and made a few changes to make it slightly better, and it seems to work fine. Now there's a othermatrix server buffer and a matrix serverbuffer, and the /matrix connect command will get printed correctly too. Depending on your log filename format that might have some problems still.
When I do so, I periodically saw:
weechat =!= | Call to API errored in command url:https://matrix.dluciv.name/_matrix/client/r0/login, maybe timeout?
Where matrix.dluciv.name is my homeserver. It is not always so and sometimes it happens so to matrix.org server while my one works ok.
That is unrelated, and just the script telling you it has problems connecting to the homeserver. Could be anything really, network problems, timeouts, dns, etc. Check your serverlogs, and you can also get debug information out of matrix using /matrix debug (but it is very spammy)