Remove useless check for !nick from userhostbase callbacks

The userhostbase callback is always called with non-null nick.  Checking for
this is just noise which also sometimes results in odd compiler warnings.
This commit is contained in:
Kevin Easton
2015-06-24 23:20:53 +10:00
parent 05cf540a99
commit 28bd7a66b6
8 changed files with 53 additions and 57 deletions

View File

@@ -458,9 +458,10 @@ DCC_List *find_dcc_pending(char *nick, char *desc, char *othername, int type, in
void add_userhost_to_chat(UserhostItem *stuff, char *nick, char *args)
{
SocketList *Client = NULL;
DCC_int *n = NULL;
if (!stuff || !nick || !stuff->nick || !stuff->user || !stuff->host || !strcmp(stuff->user, "<UNKNOWN>"))
SocketList *Client = NULL;
DCC_int *n = NULL;
if (!stuff || !stuff->nick || !stuff->user || !stuff->host || !strcmp(stuff->user, "<UNKNOWN>"))
return;
if ((Client = find_dcc(nick, "chat", NULL, DCC_CHAT, 0, -1, -1)))
n = (DCC_int *)get_socketinfo(Client->is_read);