]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_samode.cpp
Fix issue #657, fix sending FNAME with spaces
[user/henk/code/inspircd.git] / src / modules / m_samode.cpp
index 2b5ec1bd8a861d015a7f8eeb1b2767513e7e95fd..9b71992a60888f04f8b27652d7b0e77b725e9048 100644 (file)
@@ -32,6 +32,7 @@ class CommandSamode : public Command
        bool active;
        CommandSamode(Module* Creator) : Command(Creator,"SAMODE", 2)
        {
+               allow_empty_last_param = false;
                flags_needed = 'o'; Penalty = 0; syntax = "<target> <modes> {<mode-parameters>}";
                active = false;
        }
@@ -54,7 +55,11 @@ class ModuleSaMode : public Module
        ModuleSaMode()
                : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cmd);
                ServerInstance->Modules->Attach(I_OnPreMode, this);
        }