diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-09-06 08:48:43 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-09-06 08:48:43 +0200 |
commit | 5a5e05eae9cfc037b82a2ece27d54419e71f534c (patch) | |
tree | 7f132cbb84dbb9bbe09c8c47d7f2d2f4b71c0ced /src/plugins | |
parent | 761ac5d0e98c06c27a3280fdac7e85fd2082d40f (diff) | |
download | weechat-5a5e05eae9cfc037b82a2ece27d54419e71f534c.zip |
irc: display nick changes in server buffer (closes #188)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 3c15d614d..928f7b5dd 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1055,6 +1055,33 @@ IRC_PROTOCOL_CALLBACK(nick) ptr_nick_found = NULL; + /* first display message in server buffer if it's local nick */ + if (local_nick) + { + /* temporary disable hotlist */ + weechat_buffer_set (NULL, "hotlist", "-"); + + snprintf (str_tags, sizeof (str_tags), + "irc_nick1_%s,irc_nick2_%s", + nick, + new_nick); + weechat_printf_date_tags (server->buffer, + date, + irc_protocol_tags (command, + str_tags, + NULL, + address), + _("%sYou are now known as " + "%s%s%s"), + weechat_prefix ("network"), + IRC_COLOR_CHAT_NICK_SELF, + new_nick, + IRC_COLOR_RESET); + + /* enable hotlist */ + weechat_buffer_set (NULL, "hotlist", "+"); + } + for (ptr_channel = server->channels; ptr_channel; ptr_channel = ptr_channel->next_channel) { @@ -1094,7 +1121,7 @@ IRC_PROTOCOL_CALLBACK(nick) if (!ptr_nick->host) ptr_nick->host = strdup (address); - /* change nick and display message on all channels */ + /* change nick and display message on channel */ old_color = strdup (ptr_nick->color); irc_nick_change (server, ptr_channel, ptr_nick, new_nick); if (local_nick) |