summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_sqloper.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-06 21:55:47 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-06 21:55:47 +0000
commit04416cb33d2f956fd5dcbdbf298afebde118f522 (patch)
treefd0a9d8f00e844a22b7c2644bbb7bfd724155f34 /src/modules/extra/m_sqloper.cpp
parentec8ad2737e6bc5426714244747667ab4e97f2a33 (diff)
Grr at windows exports
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10424 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_sqloper.cpp')
-rw-r--r--src/modules/extra/m_sqloper.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index ca6a2149e..a273e15c1 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -78,6 +78,21 @@ public:
ServerInstance->Modules->Attach(eventlist, this, 3);
}
+
+ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
+ {
+ std::stringstream hl(hostlist);
+ std::string xhost;
+ while (hl >> xhost)
+ {
+ if (InspIRCd::Match(host, xhost, NULL) || InspIRCd::MatchCIDR(ip, xhost, NULL))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
virtual void OnLoadModule(Module* mod, const std::string& name)
{
if (ServerInstance->Modules->ModuleHasInterface(mod, "HashRequest"))