ircv3-ideas icon indicating copy to clipboard operation
ircv3-ideas copied to clipboard

Informational ISUPPORT or cap for joined channel restoration

Open emersion opened this issue 3 years ago • 7 comments

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:

  • User connects with client A
  • User joins #ircv3
  • Client A gets disconnected (closed or offline)
  • User connects with client B (e.g. different device)
  • User leaves #ircv3
  • Client A reconnects (user launches it again, or the device becomes online)
  • Client A sends JOIN #ircv3 because it was previously opened
  • User is annoyed because #ircv3 shows up again, even if they left the channel

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

cc @slingamn @DarthGandalf

emersion avatar Mar 18 '22 16:03 emersion

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

DarthGandalf avatar Mar 18 '22 16:03 DarthGandalf

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.

emersion avatar Mar 18 '22 17:03 emersion

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?

DarthGandalf avatar Mar 18 '22 17:03 DarthGandalf

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.

flashcode avatar Mar 18 '22 17:03 flashcode

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 avatar Mar 18 '22 17:03 emersion

@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?

emersion avatar Mar 18 '22 17:03 emersion

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

flashcode avatar Mar 18 '22 17:03 flashcode