summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/channel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c
index cd66e39..1c04488 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -641,9 +641,6 @@ is_banned(const struct Channel *chptr, const struct Client *who)
int
can_join(struct Client *source_p, struct Channel *chptr, const char *key)
{
- if (is_banned(chptr, source_p))
- return ERR_BANNEDFROMCHAN;
-
#ifdef HAVE_LIBCRYPTO
if ((chptr->mode.mode & MODE_SSLONLY) && !source_p->localClient->fd.ssl)
return ERR_SSLONLYCHAN;
@@ -670,6 +667,9 @@ can_join(struct Client *source_p, struct Channel *chptr, const char *key)
chptr->mode.limit)
return ERR_CHANNELISFULL;
+ if (is_banned(chptr, source_p))
+ return ERR_BANNEDFROMCHAN;
+
return 0;
}