]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Grr at windows exports
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 6 Sep 2008 21:55:47 +0000 (21:55 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 6 Sep 2008 21:55:47 +0000 (21:55 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10424 e03df62e-2008-0410-955e-edbf42e46eb7

include/commands/cmd_oper.h
src/modules/extra/m_sqloper.cpp

index bca358165aed8e5eaace03576cfbfee7b425f22d..3ec8cbca79fc6d408033f695a9bc3bd1e97917e8 100644 (file)
@@ -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
index ca6a2149e58a6da007c8b7906a11c903ad6145a3..a273e15c16d1fc8d7c7982e54c03b51a13f4b0a9 100644 (file)
@@ -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"))