summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index d354f2e62..51d0c173c 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -354,8 +354,11 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
{
for (BanList::iterator i = Ptr->bans.begin(); i != Ptr->bans.end(); i++)
{
- /* This allows CIDR ban matching */
- if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true)))
+ /* This allows CIDR ban matching
+ *
+ * Full masked host Full unmasked host IP with CIDR IP without CIDR
+ */
+ if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true)) || (match(mask, i->data, false)))
{
WriteServ(user->fd,"474 %s %s :Cannot join channel (You're banned)",user->nick, Ptr->name);
return NULL;