summary refs log tree commit diff stats
path: root/src/common/userlist.c
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-05-23 19:12:10 +0100
committerGitHub <noreply@github.com>2021-05-23 13:12:10 -0500
commite4fd69e3d4ec2eb707a693ea69b8e14181249d0a (patch)
tree8469ab29009e0e5314c4637ee88706184b78e20b /src/common/userlist.c
parentf0554b27df459b7794d990f9da72318e2e3d2620 (diff)
Implement support for the IRCv3 SETNAME specification. (#2571)
Diffstat (limited to 'src/common/userlist.c')
-rw-r--r--src/common/userlist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/userlist.c b/src/common/userlist.c
index 0f28a000..17719ff6 100644
--- a/src/common/userlist.c
+++ b/src/common/userlist.c
@@ -130,8 +130,11 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname,
 			g_free (user->hostname);
 			user->hostname = g_strdup (hostname);
 		}
-		if (!user->realname && realname && *realname)
+		if (realname && *realname && g_strcmp0 (user->realname, realname) != 0)
+		{
+			g_free (user->realname);
 			user->realname = g_strdup (realname);
+		}
 		if (!user->servername && servername)
 			user->servername = g_strdup (servername);
 		if (!user->account && account && strcmp (account, "0") != 0)