From 37118a4d2b70c11a76c732346975c2745d3cc4c6 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 24 May 2021 02:53:28 +0100 Subject: Implement support for the IRCv3 account-tag specification. (#2572) Co-authored-by: Patrick --- src/common/userlist.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/common/userlist.c') diff --git a/src/common/userlist.c b/src/common/userlist.c index 17719ff6..5f2d67f2 100644 --- a/src/common/userlist.c +++ b/src/common/userlist.c @@ -101,13 +101,15 @@ userlist_set_account (struct session *sess, char *nick, char *account) user = userlist_find (sess, nick); if (user) { - g_free (user->account); - if (strcmp (account, "*") == 0) - user->account = NULL; - else + { + g_clear_pointer (&user->account, g_free); + } else if (g_strcmp0 (user->account, account)) + { + g_free (user->account); user->account = g_strdup (account); - + } + /* gui doesnt currently reflect login status, maybe later fe_userlist_rehash (sess, user); */ } -- cgit 1.4.1