New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dequis opened this Issue Dec 7, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@dequis
Member

dequis commented Dec 7, 2014

Original flyspray ticket: http://bugs.irssi.org/index.php?do=details&task_id=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)

@dequis dequis referenced this issue Sep 10, 2015

Open

Bug migration #26

19 of 42 tasks complete
@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Jan 3, 2016

@dequis "I was going to fix this" kthx

@ailin-nemui ailin-nemui added the bug label Jan 3, 2016

LemonBoy added a commit to LemonBoy/irssi that referenced this issue Jan 12, 2016

Correctly serialize the window names.
Use the visible_name instead of name when available.
Fixes the broken serialization of safe channels (irssi#183).

LemonBoy added a commit to LemonBoy/irssi that referenced this issue Jan 13, 2016

Correctly serialize the window names.
Use the visible_name instead of name when available.
Fixes the broken serialization of safe channels (irssi#183).

LemonBoy added a commit to LemonBoy/irssi that referenced this issue Jan 20, 2016

Correctly serialize the window names.
Use the visible_name instead of name when available.
Fixes the broken serialization of safe channels (irssi#183).

LemonBoy added a commit to LemonBoy/irssi that referenced this issue Jan 20, 2016

Correctly serialize the window names.
Use the visible_name instead of name when available.
Fixes the broken serialization of safe channels (irssi#183).
@dequis

This comment has been minimized.

Member

dequis commented Jan 26, 2016

Fixed by lemon in #405

@dequis dequis closed this Jan 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment