diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 4 | ||||
-rw-r--r-- | src/xline.cpp | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 51d0c173c..1273ff07a 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -356,9 +356,9 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri { /* This allows CIDR ban matching * - * Full masked host Full unmasked host IP with CIDR IP without CIDR + * Full masked host Full unmasked host IP with/without CIDR */ - if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true)) || (match(mask, i->data, false))) + if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true))) { WriteServ(user->fd,"474 %s %s :Cannot join channel (You're banned)",user->nick, Ptr->name); return NULL; diff --git a/src/xline.cpp b/src/xline.cpp index 32619b18c..830f6d7c6 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -443,10 +443,10 @@ char* matches_gline(const char* host) if ((glines.empty()) && (pglines.empty())) return NULL; for (std::vector<GLine>::iterator i = glines.begin(); i != glines.end(); i++) - if (match(host,i->hostmask)) + if (match(host,i->hostmask, true)) return i->reason; for (std::vector<GLine>::iterator i = pglines.begin(); i != pglines.end(); i++) - if (match(host,i->hostmask)) + if (match(host,i->hostmask, true)) return i->reason; return NULL; } @@ -458,10 +458,10 @@ char* matches_exception(const char* host) char host2[MAXBUF]; snprintf(host2,MAXBUF,"*@%s",host); for (std::vector<ELine>::iterator i = elines.begin(); i != elines.end(); i++) - if ((match(host,i->hostmask)) || (match(host2,i->hostmask))) + if ((match(host,i->hostmask)) || (match(host2,i->hostmask, true))) return i->reason; for (std::vector<ELine>::iterator i = pelines.begin(); i != pelines.end(); i++) - if ((match(host,i->hostmask)) || (match(host2,i->hostmask))) + if ((match(host,i->hostmask)) || (match(host2,i->hostmask, true))) return i->reason; return NULL; } @@ -558,10 +558,10 @@ char* matches_zline(const char* ipaddr) if ((zlines.empty()) && (pzlines.empty())) return NULL; for (std::vector<ZLine>::iterator i = zlines.begin(); i != zlines.end(); i++) - if (match(ipaddr,i->ipaddr,true)) + if (match(ipaddr,i->ipaddr, true)) return i->reason; for (std::vector<ZLine>::iterator i = pzlines.begin(); i != pzlines.end(); i++) - if (match(ipaddr,i->ipaddr,true)) + if (match(ipaddr,i->ipaddr, true)) return i->reason; return NULL; } @@ -573,10 +573,10 @@ char* matches_kline(const char* host) if ((klines.empty()) && (pklines.empty())) return NULL; for (std::vector<KLine>::iterator i = klines.begin(); i != klines.end(); i++) - if (match(host,i->hostmask)) + if (match(host,i->hostmask, true)) return i->reason; for (std::vector<KLine>::iterator i = pklines.begin(); i != pklines.end(); i++) - if (match(host,i->hostmask)) + if (match(host,i->hostmask, true)) return i->reason; return NULL; } |