summary refs log tree commit diff stats
path: root/src/common/userlist.c
diff options
context:
space:
mode:
authorTingPing <TingPing@users.noreply.github.com>2013-12-23 13:53:59 -0800
committerTingPing <TingPing@users.noreply.github.com>2013-12-23 13:53:59 -0800
commit5e455be5f3e14d89a8cebdedc755264647747639 (patch)
tree5de079f4bd8ca6a640ed7e17959943e9714e41f8 /src/common/userlist.c
parentd7e3e4c9a42e1cda4863310b20c5884cd3354826 (diff)
parent26268d318888d5a35c41b88a727f6ee3c040309d (diff)
Merge pull request #864 from RichardHitt/snadge
Ignore realname if it's a null string
Diffstat (limited to 'src/common/userlist.c')
-rw-r--r--src/common/userlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/userlist.c b/src/common/userlist.c
index 4e3a2615..7565fcd4 100644
--- a/src/common/userlist.c
+++ b/src/common/userlist.c
@@ -150,7 +150,7 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname,
 				do_rehash = TRUE;
 			user->hostname = strdup (hostname);
 		}
-		if (!user->realname && realname)
+		if (!user->realname && realname && *realname)
 			user->realname = strdup (realname);
 		if (!user->servername && servername)
 			user->servername = strdup (servername);
@@ -418,7 +418,7 @@ userlist_add (struct session *sess, char *name, char *hostname,
 	{
 		if (account && strcmp (account, "*") != 0)
 			user->account = strdup (account);
-		if (realname)
+		if (realname && *realname)
 			user->realname = strdup (realname);
 	}