summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-messages.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-05-16 00:34:37 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-05-16 00:34:37 +0000
commitd346fbe1a9c6615c88dfacc420f0256b5a751440 (patch)
tree2afa5956d03f670310bb45e019c2259b2ba46a10 /src/fe-common/core/fe-messages.c
parentee80e7601a0e664525cfc1f47bf90f30c93512d4 (diff)
downloadirssi-d346fbe1a9c6615c88dfacc420f0256b5a751440.zip
Better !channel support - window items now have "visual_name" and channels
and queries also have "name". Normally they're identical but with !channels the visible_name contains the short !channel name, while name contains full !ABCDEchannel name. The visible_name should be used whenever displaying the channel name, or as printtext()'s target. So, this breaks a few scripts in !channels, they need to be modified to use $channel->{visible_name} instead. Also /LAYOUT SAVE should finally work properly with !channels. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2797 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-messages.c')
-rw-r--r--src/fe-common/core/fe-messages.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c
index 44c9fb35..311c2adf 100644
--- a/src/fe-common/core/fe-messages.c
+++ b/src/fe-common/core/fe-messages.c
@@ -347,7 +347,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
if (!nicklist_find(rec, nick))
continue;
- if (ignore_check(server, nick, address, rec->name,
+ if (ignore_check(server, nick, address, rec->visible_name,
reason, MSGLEVEL_QUITS)) {
count++;
continue;
@@ -355,17 +355,18 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
if (print_channel == NULL ||
active_win->active == (WI_ITEM_REC *) rec)
- print_channel = rec->name;
+ print_channel = rec->visible_name;
if (once)
- g_string_sprintfa(chans, "%s,", rec->name);
+ g_string_sprintfa(chans, "%s,", rec->visible_name);
else {
window = window_item_window((WI_ITEM_REC *) rec);
if (g_slist_find(windows, window) == NULL) {
windows = g_slist_append(windows, window);
- printformat(server, rec->name, MSGLEVEL_QUITS,
+ printformat(server, rec->visible_name,
+ MSGLEVEL_QUITS,
TXT_QUIT, nick, address, reason,
- rec->name);
+ rec->visible_name);
}
}
count++;
@@ -441,8 +442,8 @@ static void print_nick_change(SERVER_REC *server, const char *newnick,
continue;
windows = g_slist_append(windows, window);
- print_nick_change_channel(server, channel->name, newnick,
- oldnick, address, ownnick);
+ print_nick_change_channel(server, channel->visible_name,
+ newnick, oldnick, address, ownnick);
msgprint = TRUE;
}