From c15c30770ebdc4dd2abfb9aa9e6feafa1d7ba2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 20 Jun 2017 07:21:08 +0200 Subject: 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) --- src/plugins/irc/irc-nick.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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) -- cgit v1.2.3