ircv3 / ircv3-ideas

46 stars 3 forks source link

Informational ISUPPORT or cap for joined channel restoration #91

Open emersion opened 2 years ago

emersion commented 2 years ago

When a client reconnects to a bouncer or bouncer-like IRC server such as soju, znc, or ergo, it's not desirable to re-join all previously joined channels: the server is responsible for keeping track of joined channels and will send JOIN messages to the client.

However clients have no way to discover that a server will keep track of joined channels. This leads to annoying behavior:

It would be nice to have an ISUPPORT token to stop clients from sending JOIN after connecting, e.g. JOINRESTORE.

cc @slingamn @DarthGandalf

DarthGandalf commented 2 years ago

If user wants to leave a channel, he shouldn't have it in the autojoin list in any client.

I think silently not joining the channels even though they are configured in the client will be more confusing

emersion commented 2 years ago

The idea here is to have the client behave correctly by default, without requiring the user to turn off the autojoin settings. BTW, some clients don't even provide autojoin settings (e.g. WeeChat or all of my clients).

If the user has configured an explicit autojoin setting in the client, it should be used. Otherwise, the client can use this hint from the server.

DarthGandalf commented 2 years ago

Otherwise, the client can use this hint from the server.

If client isn't going to JOIN any channel, this token wouldn't be needed, no?

In which case the client tries to join a channel without being told to join the channel? Does weechat somehow remember what it joined before without explicit setting?

flashcode commented 2 years ago

Oh, I just added a way in WeeChat a way to automatically save joined channels (with server option "autojoin_dynamic").

Anyway, this can be turned of per server, in case in future WeeChat implements such tracking provided by the server.

@emersion: what do you mean by no "autojoin" in WeeChat? There's such option since the beginning, it was just set manually by the user until recently.

emersion commented 2 years ago

Does weechat somehow remember what it joined before without explicit setting?

Yes. WeeChat will re-join channels on reconnect, but has no way to turn this feature off.

Even if WeeChat had a way to turn this off, it would be better to just Do The Right Thing without any need for manual configuration.

emersion commented 2 years ago

@flashcode hmmm, when I /reconnect -all in WeeChat, it sends JOIN for all channels, and I found no way to turn that off. But maybe I missed something?

flashcode commented 2 years ago

@emersion: you can do /reconnect -all -nojoin (by default all channels are joined)