Ignore realname if it's a null string
This commit is contained in:
parent
407613a8db
commit
26268d3188
|
@ -150,7 +150,7 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname,
|
||||||
do_rehash = TRUE;
|
do_rehash = TRUE;
|
||||||
user->hostname = strdup (hostname);
|
user->hostname = strdup (hostname);
|
||||||
}
|
}
|
||||||
if (!user->realname && realname)
|
if (!user->realname && realname && *realname)
|
||||||
user->realname = strdup (realname);
|
user->realname = strdup (realname);
|
||||||
if (!user->servername && servername)
|
if (!user->servername && servername)
|
||||||
user->servername = strdup (servername);
|
user->servername = strdup (servername);
|
||||||
|
@ -418,7 +418,7 @@ userlist_add (struct session *sess, char *name, char *hostname,
|
||||||
{
|
{
|
||||||
if (account && strcmp (account, "*") != 0)
|
if (account && strcmp (account, "*") != 0)
|
||||||
user->account = strdup (account);
|
user->account = strdup (account);
|
||||||
if (realname)
|
if (realname && *realname)
|
||||||
user->realname = strdup (realname);
|
user->realname = strdup (realname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue