Skip to content

Synchronizing away messages in away-notify #571

@grimmy

Description

@grimmy

The away-notify spec provides directions for tracking whether or not a user is away is a channel but it does not have a way to get the away message when a channel is first joined.

Background

I'm reworking the conversation member list in Pidgin 3 and am trying to put the away message in that list. However, since there's no way to synchronize away messages on JOIN, things look strange because IRC requires a message for a user to be away. So if you know that detail, this screen shot looks quite strange. Users with a clock next to their nicks are away.

Image

The Problem

Take the following example where user1 joins a channel and does a WHO after join to synchronize state. RPL_NAMREPLY has been omitted for clarity.

c: JOIN #foo
s: user1!~u@host1 JOIN #foo
c: WHO #foo
s: :server 352 user1 #foo ~u host1 server user1 H@ :0 user1
s: :server 352 user2 #foo ~u host2 server user2 G@ :0 user2
s: :server 352 user3 #foo ~u host3 server user3 G@ :0 user3
s: :server 315 user1 #foo :End of WHO list

At this point we have 3 users in the channel, user1 is here but user2 and user3 are marked as away and we have no way aside from a WHOIS to get their away messages. Lets move on for the moment and see what happens when another user joins the channel.

s: :user4!~u@host4 JOIN #foo
s: :user4!~u@host4 AWAY :I'm not here right now

This is pretty straight forward as the server sends AWAY messages because we of the away-notify spec. So new users joining are synced immediately.

Now user3 decides to come back and we're easily synchronized again.

s: :user3!~u@host3 AWAY

So at this point everyone except user2 who was away when user1 joined has their away states and messages synchronized.

Suggestions

Right now there aren't a whole lot of suggestion. The trailing parameter of WHO and WHOX can't be used because away messages can have spaces which would require the use of the trailing parameter for them, but that's already used by the real name. It could be possible to make those mutually exclusive, but if you want both pieces of information the you have to use the command twice.

Another suggestion has been to add an away-message tag to the RPL_WHOREPLY. Something like

s: @away-message=I'm\snot\shere\sright\snow :server 352 user5 #foo -u host5 server user5 G@ :0 user5

This could work but I think there might be an easier solution.

Proposal

I haven't been able to confirm this, but I presume that on net-join (when a net split is resolved), that servers are already sending AWAY messages for users that are away when rejoining the channel.

With this in mind, it seems logical to do the same thing when initially joining a channel as well. This keeps the same method for both servers and clients, clients would have one method to get notified for new away states, and it would make it possible to stop requesting the away state in WHOX.

The other benefit of this approach is that all clients that negotiate away-notify will just magically be fully synchronized on join when a server implements this.

There is a valid concern about excessive messages, but if this is in fact already happening during net-joins and no one has noticed, then it stands to reason that this might not be a concern after all. That said I don't have any hard data to confirm that.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions