summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-21 20:56:16 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-21 20:56:16 +0000
commitc16cda5d715241bb4bff8050bee942a8a34a72c0 (patch)
tree145095fad6904382ecf6775dedc5c981d406a61a /src/commands.cpp
parent5e3bfa266bd99ac15fd621c6e14d12787ba22f6e (diff)
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
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp8
1 files changed, 4 insertions, 4 deletions
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++;
}