From c16cda5d715241bb4bff8050bee942a8a34a72c0 Mon Sep 17 00:00:00 2001 From: w00t Date: Thu, 21 Aug 2008 20:56:16 +0000 Subject: match() is no longer a function+no header, now a static method of InspIRCd class, blah blah blah. Also rip out the 1.2 matcher, as it was slow, and replace it with one adapted from znc, which happens to be a tiny bit faster than 1.1's (and the fastest I've seen so far that works properly) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10212 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index a9a81f177..68ad224ae 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -14,7 +14,6 @@ /* $Core */ #include "inspircd.h" -#include "wildcard.h" #include "xline.h" #include "command_parse.h" @@ -33,7 +32,8 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, User* user) for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) { - if ((match(u->second->MakeHost(), mask, true)) || (match(u->second->MakeHostIP(), mask, true))) + if ((InspIRCd::Match(u->second->MakeHost(), mask, lowermap)) || + (InspIRCd::Match(u->second->MakeHostIP(), mask, lowermap))) { matches++; } @@ -64,7 +64,7 @@ bool InspIRCd::IPMatchesEveryone(const std::string &ip, User* user) for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) { - if (match(u->second->GetIPString(),ip,true)) + if (InspIRCd::Match(u->second->GetIPString(), ip, lowermap)) matches++; } @@ -93,7 +93,7 @@ bool InspIRCd::NickMatchesEveryone(const std::string &nick, User* user) for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) { - if (match(u->second->nick,nick)) + if (InspIRCd::Match(u->second->nick, nick, lowermap)) matches++; } -- cgit v1.2.3