From: Pekka Riikonen Date: Fri, 2 Nov 2001 11:32:24 +0000 (+0000) Subject: updates X-Git-Tag: silcertest~52 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=57085fa9a76d72b3af854133659ca3732bad3cc2 updates --- diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 59509fdd..d0cb5316 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -3035,7 +3035,8 @@ static void silc_server_command_join_channel(SilcServer server, username and/or hostname is in the ban list the access to the channel is denied. */ if (channel->ban_list) { - if (silc_string_match(channel->ban_list, check) || + if (!channel->ban_list || + silc_string_match(channel->ban_list, check) || silc_string_match(channel->ban_list, check2)) { silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN, SILC_STATUS_ERR_BANNED_FROM_CHANNEL); @@ -3052,8 +3053,9 @@ static void silc_server_command_join_channel(SilcServer server, /* Check the channel passphrase if set. */ if (channel->mode & SILC_CHANNEL_MODE_PASSPHRASE) { - if (!passphrase || memcmp(channel->passphrase, passphrase, - strlen(channel->passphrase))) { + if (!passphrase || !channel->passphrase || + memcmp(channel->passphrase, passphrase, + strlen(channel->passphrase))) { silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN, SILC_STATUS_ERR_BAD_PASSWORD); goto out;