diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-06 19:43:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-06 19:43:47 +0000 |
commit | d4df7be5a9ee0ba11869529600c1af930f6cec61 (patch) | |
tree | 31445af5db91e500863b65e9697960f865ab95a3 /src | |
parent | 4f68ff74b96fa4a81eb861ac74129b30911d136d (diff) |
CIDR g/k/e lines to go with zlines
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4744 e03df62e-2008-0410-955e-edbf42e46eb7
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; } |