]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_vhost.cpp
Remove InspIRCd* parameters and fields
[user/henk/code/inspircd.git] / src / modules / m_vhost.cpp
index 005177cdbca114fb7b9162f4a667d3c2184cd5ad..f1a074aec8aeb79f569c65c916658ba8547e3d57 100644 (file)
 class CommandVhost : public Command
 {
  public:
-       CommandVhost (InspIRCd* Instance) : Command(Instance,"VHOST", 0, 2)
+       CommandVhost(Module* Creator) : Command(Creator,"VHOST", 2)
        {
-               this->source = "m_vhost.so";
                syntax = "<username> <password>";
        }
 
        CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
-               ConfigReader *Conf = new ConfigReader(ServerInstance);
+               ConfigReader *Conf = new ConfigReader;
 
                for (int index = 0; index < Conf->Enumerate("vhost"); index++)
                {
@@ -44,7 +43,7 @@ class CommandVhost : public Command
                                        user->WriteServ("NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask);
                                        user->ChangeDisplayedHost(mask.c_str());
                                        delete Conf;
-                                       return CMD_LOCALONLY;
+                                       return CMD_SUCCESS;
                                }
                        }
                }
@@ -61,7 +60,7 @@ class ModuleVHost : public Module
        CommandVhost cmd;
 
  public:
-       ModuleVHost(InspIRCd* Me) : Module(Me), cmd(Me)
+       ModuleVHost() : cmd(this)
        {
                ServerInstance->AddCommand(&cmd);
        }
@@ -73,7 +72,7 @@ class ModuleVHost : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$",VF_VENDOR,API_VERSION);
+               return Version("Provides masking of user hostnames via traditional /VHOST command",VF_VENDOR,API_VERSION);
        }
 
 };