Cleanup remove_channel()

remove_channel() is only called in direct response to a message from a server,
so it always acts on from_server - remove the unnecessary server argument.

The channel argument is always non-NULL - remove the dead code that removed all
channels if a NULL channel was passed.
This commit is contained in:
Kevin Easton
2017-04-16 16:19:55 +10:00
parent 53f3a34ca5
commit 1ccd082cd2
5 changed files with 23 additions and 41 deletions

View File

@@ -316,7 +316,7 @@ static void not_valid_channel(char *from, char **ArgList)
if (!my_stricmp(from, get_server_itsname(from_server)))
{
if (strcmp(channel, "*"))
remove_channel(channel, from_server);
remove_channel(channel);
put_it("%s", convert_output_format(fget_string_var(FORMAT_SERVER_MSG2_FSET), "%s %s %s", update_clock(GET_TIME), channel, ArgList[1]));
}
}
@@ -343,7 +343,7 @@ static void cannot_join_channel(char *from, char **ArgList)
remove_from_join_list(chan, from_server);
if (!is_on_channel(chan, from_server, get_server_nickname(from_server)))
remove_channel(chan, from_server);
remove_channel(chan);
else
return;