ergochat / ergo

A modern IRC server (daemon/ircd) written in Go.
https://ergo.chat/
MIT License
2.29k stars 181 forks source link

ergo.chat/joined #1548

Open DanielOaks opened 3 years ago

DanielOaks commented 3 years ago

When a client connects to an always-on Oragono server (or just a bouncer like ZNC), they get a bunch of JOIN messages - one for every channel they're already connected to. Clients typically display this as a separate "you just joined XYZ channel" line in their scrollback, but really it's "you just reconnected to the server" and not really a you-joined-the-channel thing.

If you have this cap active, instead of being sent a JOIN messages you'll either just have your nickname in RPL_NAMREPLY to indicate that you're already joined to the channel, or maybe get a JOINED verb instead. idk which one feels better.

suggested by @kylef

kylef commented 3 years ago

ZNC also allows you to 'detach' a channel from a client, that allows you to have channels only in specific clients or to leave it to save bandwidth. So there may also be "PART" in that case is not impacting the presence/state of channel membership (https://wiki.znc.in/Detaching). There are also modules to automatically reattach based on mentions or keywords used.

Not sure if we want to have this extension for both JOINs and PARTs or not, but sharing that additional case (ATTACH/DETACH).

DanielOaks commented 3 years ago

How's something along these lines look?

oragono.io/joined Extension

This capability allows servers to express to clients that they are already joined to channels,
(as opposed to having just joined now). This is useful for persistent connections, for example
those provided by bouncers or special persistence features built into the server.

When this capability is requested, the server may send JOINED messages to the client, which
indicates that they are already joined to the given channels.

    JOINED [+#channel]... [-#channel]...

The JOINED message parameters are channel names, prefixed with '+' which represents the channel
is attached (the client is joined to it normally), or '-' which represents the channel is
detached (the server is hiding the channel from the client).

## Examples

Client being shown they are joined to several normal channels.

    :irc.ircv3.net JOINED +#ircv3 +#chat +#tacos

Client being shown they are joined to several normal channels, but they are detached from a few.

    :irc.ircv3.net JOINED +#ircv3 +#chat -#tacos -#pizza -&rules

**Versioning Considerations**
If any other information needs to be conveyed with JOINED messages in the future, we can always
add tags to that message (those tags will be defined in and added to this specification).
DanielOaks commented 3 years ago

from chats w/ znc, we don't need to convey the detached channels in this (that can be a separate thing if clients really want that info). they suggested syntax like @joined-already JOIN #foo instead, I'll write up two proposals in this issue, one with the special JOINED message and one that just reuses JOIN with the tag. after that, we can toss the idea around to client devs and see their thoughts (since we presumably still need to send topics, member lists, etc, the savings we get from using a new JOINED message might not be crazily big, etc).

DanielOaks commented 3 years ago

note to self, also very explicitly outline the use of this (letting clients suppress the "You have joined #channel" messages), it was a bit hard to get across why this was useful from just the above. this is something that users will actually see, and addresses an irritation that I always had when reconnecting with clients like lounge, etc.