From: brain Date: Sat, 6 Sep 2008 21:55:47 +0000 (+0000) Subject: Grr at windows exports X-Git-Tag: v2.0.23~2637 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;ds=sidebyside;h=04416cb33d2f956fd5dcbdbf298afebde118f522;p=user%2Fhenk%2Fcode%2Finspircd.git Grr at windows exports git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10424 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/include/commands/cmd_oper.h b/include/commands/cmd_oper.h index bca358165..3ec8cbca7 100644 --- a/include/commands/cmd_oper.h +++ b/include/commands/cmd_oper.h @@ -19,7 +19,7 @@ #include "users.h" #include "channels.h" -CoreExport bool OneOfMatches(const char* host, const char* ip, const char* hostlist); +bool OneOfMatches(const char* host, const char* ip, const char* hostlist); /** Handle /OPER. These command handlers can be reloaded by the core, * and handle basic RFC1459 commands. Commands within modules work 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"))