]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_vhost.cpp
Made SANICK not collide the user (theres no need to in the new 1.1 now we have return...
[user/henk/code/inspircd.git] / src / modules / m_vhost.cpp
index af2dd2bb9d2473129aa7e4e8b3976be206c28acd..eb6c3e38e151c276d0fc74aac63b52d40e810370 100644 (file)
@@ -36,7 +36,7 @@ class cmd_vhost : public command_t
                syntax = "<username> <password>";
        }
 
-       void Handle (const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle (const char** parameters, int pcnt, userrec *user)
        {
                for (int index = 0; index < Conf->Enumerate("vhost"); index++)
                {
@@ -49,11 +49,12 @@ class cmd_vhost : public command_t
                                {
                                        user->WriteServ("NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask);
                                        user->ChangeDisplayedHost(mask.c_str());
-                                       return;
+                                       return CMD_FAILURE;
                                }
                        }
                }
                user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid username or password.");
+               return CMD_FAILURE;
        }
 };
 
@@ -67,7 +68,7 @@ class ModuleVHost : public Module
        ModuleVHost(InspIRCd* Me) : Module::Module(Me)
        {
                
-               Conf = new ConfigReader;
+               Conf = new ConfigReader(ServerInstance);
                mycommand = new cmd_vhost(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }
@@ -85,7 +86,7 @@ class ModuleVHost : public Module
        virtual void OnRehash(const std::string &parameter)
        {
                DELETE(Conf);
-               Conf = new ConfigReader;
+               Conf = new ConfigReader(ServerInstance);
        }
        
        virtual Version GetVersion()