projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5b4db1
)
updates
author
Pekka Riikonen
<priikone@silcnet.org>
Fri, 2 Nov 2001 11:32:24 +0000
(11:32 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Fri, 2 Nov 2001 11:32:24 +0000
(11:32 +0000)
apps/silcd/command.c
patch
|
blob
|
history
diff --git
a/apps/silcd/command.c
b/apps/silcd/command.c
index 59509fdda36d7fca1c2d65ebdee8220ba7b8e717..d0cb5316bbb171660520c3d943de30558c328e90 100644
(file)
--- 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) {
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);
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) {
/* 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;
silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN,
SILC_STATUS_ERR_BAD_PASSWORD);
goto out;