1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 15:26:37 +02:00

irc: don't reset nick properties (prefixes/away/account/realname) on /names when the nick already exists (closes #1019)

This commit is contained in:
Sébastien Helleu
2017-06-17 15:22:01 +02:00
parent 48a3baedd5
commit fadee50664
2 changed files with 1 additions and 18 deletions
-18
View File
@@ -466,25 +466,7 @@ 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 */
irc_nick_set_prefixes (server, ptr_nick, prefixes);
ptr_nick->away = away;
if (ptr_nick->account)
free (ptr_nick->account);
ptr_nick->account = (account) ? strdup (account) : NULL;
if (ptr_nick->realname)
free (ptr_nick->realname);
ptr_nick->realname = (realname) ? strdup (realname) : NULL;
/* 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)