]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/wildcard.cpp
Move all_opers into class InspIRCd
[user/henk/code/inspircd.git] / src / wildcard.cpp
index aa9f52102d66e9600d0fcfa1371fe68d62c86647..6b84ef5b3004c54524994f8a20b579275378d4b0 100644 (file)
@@ -22,6 +22,8 @@ using namespace std;
 #include "helperfuncs.h"
 #include "inspstring.h"
 
+using irc::sockets::MatchCIDR;
+
 extern char lowermap[255];
 
 // Wed 27 Apr 2005 - Brain
@@ -83,3 +85,10 @@ bool match(const char *str, const char *mask)
        return !*wild;
 }
 
+/* Overloaded function that has the option of using cidr */
+bool match(const char *str, const char *mask, bool use_cidr_match)
+{
+       if (use_cidr_match && MatchCIDR(str, mask, true))
+               return true;
+       return match(str, mask);
+}