irc: shorten code in account callback

This commit is contained in:
Sébastien Helleu 2015-01-25 16:00:31 +01:00
parent 0f1e997090
commit 939c7b29c0

View File

@ -318,10 +318,8 @@ IRC_PROTOCOL_CALLBACK(account)
{
if (ptr_nick->account)
free (ptr_nick->account);
if (server->cap_account_notify)
ptr_nick->account = strdup (argv[2]);
else
ptr_nick->account = strdup ("*");
ptr_nick->account = (server->cap_account_notify) ?
strdup (argv[2]) : strdup ("*");
}
}