-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting to same server multiple times #374
Comments
After more test, it works well, but then, tiny concatenate both connection. So I can just join channels for the first one in the |
If you set an alias does it work? I don't think
|
Worked like a charm ! Thanks |
Oh sorry, I mistested
When I start tiny, I can see a "libera" buffer, but not the "oftc" one. |
Thanks for reporting, @eoli3n. From tiny's point of view, you're trying to connect to the same server (the bouncer) multiple times, which is currently not supported. I'll take a look into this soon. |
I think I know how to implement this, but it requires refactoring some of the most central types. It will be fairly straightforward, but a lot of code will have to change, and I may not have time any time soon to do this myself. Let me explain the idea and maybe someone can pick it up. BackgroundIn tiny, clients do not manipulate the TUI directly. Instead they write connection events to a channel. The receiving end then does the TUI updates. The receiving end of a connection channel is the tokio task defined in To determine which TUI tabs to update it needs to know the client's "name". The name is currently the server address (e.g. TUI tabs hold their connection's name, in the Note that "alias" is not used anywhere. It's only used when rendering a tab in a tab line. When it's available, we use it instead of the tab's client's name (which, as mentioned above, a tab holds in its
ProblemUsing server address as server name means if we create multiple You can observe this with this config: servers:
- addr: irc.oftc.net
port: 6697
tls: true
realname: yourname
nicks: [tiny_user]
join: ["#tiny"]
- addr: irc.oftc.net
port: 6697
tls: true
realname: yourname
nicks: [tiny_user_2]
join: ["#tiny"] If you run with this config, you'll see that same server and channel tabs are updated for both of these connections. E.g. you see channel subject twice, each incoming message to the channel twice etc. PlanClearly we can't use server address to map a connection to its TUI tabs, or the other way around, as we want to be able to have multiple connections with same server address. I suggest we use a unique number (say, a When creating the Let's call this unique number For every After that, we use the With these changes it will be possible to connect to a server multiple times. We can then improve on this by requesting user to specify an alias when connecting to a same server multiple times. It can be done later in a separate PR. |
I'm using tiny with soju irc bouncer in single stream mode.
So I connect to my server two times with, a different login to reach libera or oftc :
eoli3n/irc.oftc.net
andeoli3n/irc.libera.chat
.It seems problematic to tiny.
A solution would be to be able to set a
name
in tiny config likeThe text was updated successfully, but these errors were encountered: