]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sethost.cpp
Replace std::deque with std::vector in spanningtree and related modules
[user/henk/code/inspircd.git] / src / modules / m_sethost.cpp
index 552d4f034d7f2bf2de49c026b3588d970f1a67e6..a925e75c3d734a65001b823b3351f07ca2cc22b4 100644 (file)
@@ -53,7 +53,7 @@ class CommandSethost : public Command
 
                if (user->ChangeDisplayedHost(parameters[0].c_str()))
                {
-                       ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used SETHOST to change their displayed host to "+user->dhost);
+                       ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick)+" used SETHOST to change their displayed host to "+user->dhost);
                        return CMD_LOCALONLY;
                }
 
@@ -64,21 +64,20 @@ class CommandSethost : public Command
 
 class ModuleSetHost : public Module
 {
-       CommandSethost* mycommand;
+       CommandSethost cmd;
        char hostmap[256];
  public:
        ModuleSetHost(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me, hostmap)
        {
-               OnRehash(NULL,"");
-               mycommand = new CommandSethost(ServerInstance, hostmap);
-               ServerInstance->AddCommand(mycommand);
+               OnRehash(NULL);
+               ServerInstance->AddCommand(&cmd);
                Implementation eventlist[] = { I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
 
-       void OnRehash(User* user, const std::string &parameter)
+       void OnRehash(User* user)
        {
                ConfigReader Conf(ServerInstance);
                std::string hmap = Conf.ReadValue("hostname", "charmap", 0);
@@ -97,7 +96,7 @@ class ModuleSetHost : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("$Id$", VF_VENDOR, API_VERSION);
        }
 
 };