From 7c1237de981bbb67d57869790427929e75f925d1 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Thu, 21 May 2020 11:14:16 +0300 Subject: [PATCH] use visible channel name in layout save --- irssi.conf | 2 +- src/fe-common/core/windows-layout.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/irssi.conf b/irssi.conf index 828b5997..174d0552 100644 --- a/irssi.conf +++ b/irssi.conf @@ -107,7 +107,7 @@ channels = ( aliases = { ATAG = "WINDOW SERVER"; - ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}"; + ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{visible_name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}"; B = "BAN"; BACK = "AWAY"; BANS = "BAN"; diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 745453d5..fa209f48 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -169,12 +169,12 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item, chat_protocol_find_id(item->chat_type); if (proto != NULL) iconfig_node_set_str(subnode, "chat_type", proto->name); - iconfig_node_set_str(subnode, "name", item->name); + iconfig_node_set_str(subnode, "name", item->visible_name); if (item->server != NULL) { iconfig_node_set_str(subnode, "tag", item->server->tag); if (IS_CHANNEL(item)) { - rec = window_bind_add(window, item->server->tag, item->name); + rec = window_bind_add(window, item->server->tag, item->visible_name); if (rec != NULL) rec->sticky = TRUE; }