-// This wrapper function is required to convert both
-// strings to 'scandanavian lowercase' and make copies
-// of them to a safe location. It also ensures we don't
-// bite off more than we can chew with the length of
-// the string.
+// Below here is all wrappers around MatchInternal
+
+bool InspIRCd::Match(const std::string& str, const std::string& mask, unsigned const char* map)
+{
+ if (!map)
+ map = national_case_insensitive_map;
+
+ return MatchInternal((const unsigned char*)str.c_str(), (const unsigned char*)mask.c_str(), map);
+}
+
+bool InspIRCd::Match(const char* str, const char* mask, unsigned const char* map)
+{
+ if (!map)
+ map = national_case_insensitive_map;
+
+ return MatchInternal((const unsigned char*)str, (const unsigned char*)mask, map);
+}
+
+bool InspIRCd::MatchCIDR(const std::string& str, const std::string& mask, unsigned const char* map)
+{
+ if (irc::sockets::MatchCIDR(str, mask, true))
+ return true;
+
+ // Fall back to regular match
+ return InspIRCd::Match(str, mask, map);
+}
+
+bool InspIRCd::MatchCIDR(const char* str, const char* mask, unsigned const char* map)
+{
+ if (irc::sockets::MatchCIDR(str, mask, true))
+ return true;
+
+ // Fall back to regular match
+ return InspIRCd::Match(str, mask, map);
+}