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

@@ -214,12 +214,11 @@ void prepare_addshit(UserhostItem *stuff, char *nick, char *args)
char listbuf[BIG_BUFFER_SIZE+1];
int thetype = 0, shit = 0;
if (!stuff || !stuff->nick || !nick || !strcmp(stuff->user, "<UNKNOWN>") || my_stricmp(stuff->nick, nick))
{
bitchsay("No such nick [%s] found", nick);
return;
}
if (!stuff || !stuff->nick || !strcmp(stuff->user, "<UNKNOWN>") || my_stricmp(stuff->nick, nick))
{
bitchsay("No such nick [%s] found", nick);
return;
}
thetype = my_atol(args);
next_arg(args, &args);
@@ -271,24 +270,23 @@ int count = 0;
void prepare_adduser(UserhostItem *stuff, char *nick, char *args)
{
int thetype = 0;
unsigned long flags = 0;
int thetype = 0;
unsigned long flags = 0;
int ppp = 0;
UserList *uptr = NULL;
char *channels = NULL,
char *channels = NULL,
*passwd = NULL,
*p = NULL,
*uh,
*e_host,
*host;
if (!stuff || !stuff->nick || !nick || !strcmp(stuff->user, "<UNKNOWN>") || my_stricmp(stuff->nick, nick))
{
if (!stuff || !stuff->nick || !strcmp(stuff->user, "<UNKNOWN>") || my_stricmp(stuff->nick, nick))
{
bitchsay("No such nick [%s] found", nick);
return;
}
}
thetype = my_atol(args);
next_arg(args, &args);