]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_md5.cpp
Test stuff to fix remote stats brokage
[user/henk/code/inspircd.git] / src / modules / m_md5.cpp
index d256b0f1c65d6983a2d3ed98bbd04e244ea013d0..4ed011acf853bb2a26af24344c61e41263db4cbb 100644 (file)
@@ -2,12 +2,9 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
@@ -17,8 +14,6 @@
 /* $ModDesc: Allows for MD5 encrypted oper passwords */
 /* $ModDep: m_hash.h */
 
-using namespace std;
-
 #include "inspircd_config.h"
 #ifdef HAS_STDINT
 #include <stdint.h>
@@ -294,7 +289,7 @@ class ModuleMD5 : public Module
        virtual char* OnRequest(Request* request)
        {
                HashRequest* MD5 = (HashRequest*)request;
-               ServerInstance->Log(DEBUG,"MD5 REQUEST type %s", request->GetId());
+
                if (strcmp("KEY", request->GetId()) == 0)
                {
                        this->key = (unsigned int*)MD5->GetKeyData();
@@ -305,18 +300,16 @@ class ModuleMD5 : public Module
                }
                else if (strcmp("SUM", request->GetId()) == 0)
                {
-                       ServerInstance->Log(DEBUG,"MD5 SUM!");
                        static char data[MAXBUF];
                        GenHash((const char*)MD5->GetHashData(), data, chars ? chars : "0123456789abcdef", key);
                        return data;
                }
                else if (strcmp("NAME", request->GetId()) == 0)
                {
-                       return "MD5";
+                       return "md5";
                }
                else if (strcmp("RESET", request->GetId()) == 0)
                {
-                       ServerInstance->Log(DEBUG,"MD5 RESET!");
                        this->chars = NULL;
                        this->key = NULL;
                }
@@ -325,7 +318,7 @@ class ModuleMD5 : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
+               return Version(1,1,0,1,VF_VENDOR|VF_SERVICEPROVIDER,API_VERSION);
        }
 };