From 26268d318888d5a35c41b88a727f6ee3c040309d Mon Sep 17 00:00:00 2001 From: RichardHitt Date: Sun, 22 Dec 2013 11:19:30 -0800 Subject: Ignore realname if it's a null string --- src/common/userlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); } -- cgit 1.4.1