1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

irc: add tags "irc_nick1_xxx" and "irc_nick2_yyy" in message displayed for command "NICK"

This commit is contained in:
Sebastien Helleu
2012-12-24 16:23:01 +01:00
parent 2597bafe36
commit 2e48874ce0
2 changed files with 21 additions and 8 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.0-dev, 2012-12-23
v0.4.0-dev, 2012-12-24
Version 0.4.0 (under dev!)
@@ -58,6 +58,8 @@ Version 0.4.0 (under dev!)
aspell.check.suggestions (task #12061)
* aspell: fix creation of spellers when number of dictionaries is different
between two buffers
* irc: add tags "irc_nick1_xxx" and "irc_nick2_yyy" in message displayed for
command "NICK"
* irc: return git version in CTCP VERSION and FINGER by default, add "$git"
and "$versiongit" in format of CTCP replies
* irc: read local variable "autorejoin" in buffer to override server option
+18 -7
View File
@@ -884,8 +884,8 @@ IRC_PROTOCOL_CALLBACK(nick)
{
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick, *ptr_nick_found;
char *new_nick, *old_color, *buffer_name;
int local_nick;
char *new_nick, *old_color, *buffer_name, str_tags[512];
int local_nick, smart_filter;
struct t_irc_channel_speaking *ptr_nick_speaking;
IRC_PROTOCOL_MIN_ARGS(3);
@@ -944,9 +944,15 @@ IRC_PROTOCOL_CALLBACK(nick)
irc_nick_change (server, ptr_channel, ptr_nick, new_nick);
if (local_nick)
{
snprintf (str_tags, sizeof (str_tags),
"irc_nick1_%s,irc_nick2_%s",
nick,
new_nick);
weechat_printf_date_tags (ptr_channel->buffer,
date,
irc_protocol_tags (command, NULL, NULL),
irc_protocol_tags (command,
str_tags,
NULL),
_("%sYou are now known as "
"%s%s%s"),
weechat_prefix ("network"),
@@ -962,13 +968,18 @@ IRC_PROTOCOL_CALLBACK(nick)
ptr_nick_speaking = ((weechat_config_boolean (irc_config_look_smart_filter))
&& (weechat_config_boolean (irc_config_look_smart_filter_nick))) ?
irc_channel_nick_speaking_time_search (server, ptr_channel, nick, 1) : NULL;
smart_filter = (weechat_config_boolean (irc_config_look_smart_filter)
&& weechat_config_boolean (irc_config_look_smart_filter_nick)
&& !ptr_nick_speaking);
snprintf (str_tags, sizeof (str_tags),
"%sirc_nick1_%s,irc_nick2_%s",
(smart_filter) ? "irc_smart_filter," : "",
nick,
new_nick);
weechat_printf_date_tags (ptr_channel->buffer,
date,
irc_protocol_tags (command,
(!weechat_config_boolean (irc_config_look_smart_filter)
|| !weechat_config_boolean (irc_config_look_smart_filter_nick)
|| ptr_nick_speaking) ?
NULL : "irc_smart_filter",
str_tags,
NULL),
_("%s%s%s%s is now known as "
"%s%s%s"),