]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_oper_cert.cpp
Handle file not found, and tidy up the perl.
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_oper_cert.cpp
index 794aabcd263e4e0bf543b7f5c56197ec306046fe..571dcad06eb5882801e898bd1534832412d90159 100644 (file)
 /* $ModDep: transport.h */
 
 #include "inspircd.h"
-#include "inspircd_config.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 #include "transport.h"
 
 /** Handle /FINGERPRINT
  */
-class cmd_fingerprint : public Command
+class CommandFingerprint : public Command
 {
  public:
-       cmd_fingerprint (InspIRCd* Instance) : Command(Instance,"FINGERPRINT", 0, 1)
+       CommandFingerprint (InspIRCd* Instance) : Command(Instance,"FINGERPRINT", 0, 1)
        {
                this->source = "m_ssl_oper_cert.so";
                syntax = "<nickname>";
@@ -71,14 +67,14 @@ class ModuleOperSSLCert : public Module
 {
        ssl_cert* cert;
        bool HasCert;
-       cmd_fingerprint* mycommand;
+       CommandFingerprint* mycommand;
        ConfigReader* cf;
  public:
 
        ModuleOperSSLCert(InspIRCd* Me)
                : Module(Me)
        {
-               mycommand = new cmd_fingerprint(ServerInstance);
+               mycommand = new CommandFingerprint(ServerInstance);
                ServerInstance->AddCommand(mycommand);
                cf = new ConfigReader(ServerInstance);
                Implementation eventlist[] = { I_OnPreCommand, I_OnRehash };
@@ -103,7 +99,7 @@ class ModuleOperSSLCert : public Module
                std::string xhost;
                while (hl >> xhost)
                {
-                       if (InspIRCd::Match(host, xhost) || InspIRCd::MatchCIDR(ip, xhost))
+                       if (InspIRCd::Match(host, xhost, ascii_case_insensitive_map) || InspIRCd::MatchCIDR(ip, xhost, ascii_case_insensitive_map))
                        {
                                return true;
                        }
@@ -152,7 +148,7 @@ class ModuleOperSSLCert : public Module
                                if (!OneOfMatches(TheHost, TheIP, HostName.c_str()))
                                        continue;
 
-                               if (Password.length() && !ServerInstance->PassCompare(user, Password.c_str(),parameters[1].c_str(), HashType.c_str()))
+                               if (Password.length() && ServerInstance->PassCompare(user, Password.c_str(),parameters[1].c_str(), HashType.c_str()))
                                        continue;
 
                                if (SSLOnly && !user->GetExt("ssl", dummy))
@@ -180,7 +176,7 @@ class ModuleOperSSLCert : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1,2,0,0,VF_VENDOR,API_VERSION);
+               return Version("$Id$", VF_VENDOR, API_VERSION);
        }
 };