]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_vhost.cpp
Fix a numeric collision with UnrealIRCd's help numerics.
[user/henk/code/inspircd.git] / src / modules / m_vhost.cpp
index 2e25849aed832876faea0e0800d0dc06e3734ebb..01df33cae02eeabafccf2a726253a3f80ded3151 100644 (file)
@@ -32,7 +32,7 @@ class CommandVhost : public Command
                syntax = "<username> <password>";
        }
 
-       CmdResult Handle (const std::vector<std::string> &parameters, User *user)
+       CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
        {
                ConfigTagList tags = ServerInstance->Config->ConfTags("vhost");
                for(ConfigIter i = tags.first; i != tags.second; ++i)
@@ -43,12 +43,12 @@ class CommandVhost : public Command
                        std::string pass = tag->getString("pass");
                        std::string hash = tag->getString("hash");
 
-                       if (parameters[0] == username && !ServerInstance->PassCompare(user, pass, parameters[1], hash))
+                       if (parameters[0] == username && ServerInstance->PassCompare(user, pass, parameters[1], hash))
                        {
                                if (!mask.empty())
                                {
                                        user->WriteNotice("Setting your VHost: " + mask);
-                                       user->ChangeDisplayedHost(mask.c_str());
+                                       user->ChangeDisplayedHost(mask);
                                        return CMD_SUCCESS;
                                }
                        }