Skip to content

/layout save stores the "visible name" of !-channels (safe channels) instead of the real one #183

@dequis

Description

@dequis

Original flyspray ticket: irssi-import/bugs.irssi.org#331


Context

Safe channels are a feature defined in rfc2811 section 3.2 intended for netsplit protection in serviceless networks such as ircnet. They are created by /join !!channelname which, if successful, results in a join to !XXXXXchannelname where XXXXX is a random prefix. They can be joined afterwards with /join !channelname or /join !XXXXXchannelname (former redirects to latter)

Irssi handles this kind of channels by hiding the random prefix as suggested by the RFC

The obvious drawback for such labels is that they are not user friendly. However, it is fairly trivial for a client program to improve on this

This is done by checking if the first character is !, skipping the first 5 characters, and setting those to the visible_name attribute of window items / channels.


The actual bug

As the title says, /layout save stores the visible name, not the full name. So the config says something like this

  3 = {
    items = (
      {
        type = "CHANNEL";
        chat_type = "IRC";
        name = "!channelname";
        tag = "IRCnet";
      }
    );
  };

And the name line should say name = "!XXXXXchannelname"; instead.

By having the visible name in the layout, doing /join !channelname works as expected, but doing /join XXXXXchannelname creates a new window. If this is inverted and the full name is store, the opposite happens.

This causes problems with scripts like autostuff which use channel->{name} when adding channels to autojoin.

(I was going to fix this, but decided to open a bug first just in case discussion is needed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions