mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
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
This commit is contained in:
parent
ee80e7601a
commit
d346fbe1a9
44 changed files with 325 additions and 247 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue