irc: don't reset nick properties (prefixes/away/account/realname) on /names when the nick already exists (closes #1019)
This commit is contained in:
parent
48a3baedd5
commit
fadee50664
@ -43,6 +43,7 @@ Bug fixes::
|
||||
* buflist: fix slow switch of buffer when there are a lot of buffers opened (issue #998)
|
||||
* buflist: add option "bar" in command /buflist, do not automatically add the "buflist" bar when the option buflist.look.enabled is off (issue #994)
|
||||
* buflist: fix crash on drag & drop of buffers
|
||||
* irc: don't reset nick properties (prefixes/away/account/realname) on /names when the nick already exists (issue #1019)
|
||||
* irc: fix memory leak in case of error in "ecdsa-nist256p-challenge" SASL mechanism
|
||||
* relay: rebind on address after option relay.network.bind_address is changed
|
||||
* relay: fix parsing of CAP command arguments in irc protocol (issue #995)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user