Remove unused 'unlink' argument from check_whowas_nick_buffer()

Every caller was passing 0 for unlink, so remove it.  This simplifies the function.

Also change the nick and channel arguments to const char *.
This commit is contained in:
Kevin Easton
2017-02-22 22:28:17 +11:00
parent 0c721de2a5
commit 2363ea709d
4 changed files with 10 additions and 19 deletions

View File

@@ -77,34 +77,25 @@ extern WhowasList *check_whowas_buffer(char *nick, char *userhost, char *channel
}
extern WhowasList * check_whowas_nick_buffer(char *nick, char *channel, int unlink)
WhowasList *check_whowas_nick_buffer(const char *nick, const char *channel)
{
WhowasList *tmp = NULL, *last = NULL;
WhowasList *tmp = NULL;
for (tmp = next_userhost(&whowas_userlist_list, NULL); tmp; tmp = next_userhost(&whowas_userlist_list, tmp))
{
if (!my_stricmp(tmp->nicklist->nick, nick) && !my_stricmp(tmp->channel, channel))
{
if (unlink)
{
last = find_userhost_channel(tmp->nicklist->host, tmp->channel, 1, &whowas_userlist_list);
tmp = NULL;
}
return last?last:tmp;
return tmp;
}
}
for (tmp = next_userhost(&whowas_reg_list, NULL); tmp; tmp = next_userhost(&whowas_reg_list, tmp))
{
if (!my_stricmp(tmp->nicklist->nick, nick) && !my_stricmp(tmp->channel, channel))
{
if (unlink)
{
last = find_userhost_channel(tmp->nicklist->host, tmp->channel, 1, &whowas_reg_list);
tmp = NULL;
}
return last?last:tmp;
return tmp;
}
}
return( NULL );
return NULL;
}
extern WhowasList * check_whosplitin_buffer(char *nick, char *userhost, char *channel, int unlink)