]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_password_hash.cpp
fix some unitialised vectors and tidy up a bit.
[user/henk/code/inspircd.git] / src / modules / m_password_hash.cpp
index 66b917e18057deb398168bc771a90c971c8304a4..bc0a14f8685add8caaf5de953b5893de51e7f6d5 100644 (file)
@@ -28,7 +28,7 @@ class CommandMkpasswd : public Command
        std::deque<std::string> &names;
  public:
        CommandMkpasswd (InspIRCd* Instance, Module* S, hashymodules &h, std::deque<std::string> &n)
-               : Command(Instance,"MKPASSWD", 'o', 2), Sender(S), hashers(h), names(n)
+               : Command(Instance,"MKPASSWD", "o", 2), Sender(S), hashers(h), names(n)
        {
                this->source = "m_password_hash.so";
                syntax = "<hashtype> <any-text>";
@@ -52,9 +52,9 @@ class CommandMkpasswd : public Command
                }
        }
 
-       CmdResult Handle (const char** parameters, int pcnt, User *user)
+       CmdResult Handle (const std::vector<std::string>& parameters, User *user)
        {
-               MakeHash(user, parameters[0], parameters[1]);
+               MakeHash(user, parameters[0].c_str(), parameters[1].c_str());
                /* NOTE: Don't propagate this across the network!
                 * We dont want plaintext passes going all over the place...
                 * To make sure it goes nowhere, return CMD_FAILURE!
@@ -120,7 +120,7 @@ class ModuleOperHash : public Module
        {
                if (ServerInstance->Modules->ModuleHasInterface(mod, "HashRequest"))
                {
-                       ServerInstance->Log(DEBUG, "Post-load registering hasher: %s", name.c_str());
+                       ServerInstance->Logs->Log("m_password-hash",DEBUG, "Post-load registering hasher: %s", name.c_str());
                        std::string sname = HashNameRequest(this, mod).Send();
                        hashers[sname.c_str()] = mod;
                        names.push_back(sname);
@@ -155,7 +155,7 @@ class ModuleOperHash : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
+               return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
 };