summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-06-20 07:21:08 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-20 07:21:08 +0200
commitc15c30770ebdc4dd2abfb9aa9e6feafa1d7ba2d3 (patch)
tree7105a1ad76fa4076a8d3d8df2aae96388860f789 /src/plugins
parentfadee506642ee80f42027816cc6cb758dcb68011 (diff)
downloadweechat-c15c30770ebdc4dd2abfb9aa9e6feafa1d7ba2d3.zip
irc: fix update of nick prefixes when the names are received in message 353 (closes #1022)
This regression was introduced by commit fadee506642ee80f42027816cc6cb758dcb68011 (issue #1019)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-nick.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c
index 391774741..de64fd4c5 100644
--- a/src/plugins/irc/irc-nick.c
+++ b/src/plugins/irc/irc-nick.c
@@ -466,7 +466,18 @@ irc_nick_new (struct t_irc_server *server, struct t_irc_channel *channel,
/* nick already exists on this channel? */
ptr_nick = irc_nick_search (server, channel, nickname);
if (ptr_nick)
+ {
+ /* remove old nick from nicklist */
+ irc_nick_nicklist_remove (server, channel, ptr_nick);
+
+ /* update nick prefixes */
+ irc_nick_set_prefixes (server, ptr_nick, prefixes);
+
+ /* add new nick in nicklist */
+ irc_nick_nicklist_add (server, channel, ptr_nick);
+
return ptr_nick;
+ }
/* alloc memory for new nick */
if ((new_nick = malloc (sizeof (*new_nick))) == NULL)