]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_satopic.cpp
Change httpd modules to use the MODNAME constant in headers.
[user/henk/code/inspircd.git] / src / modules / m_satopic.cpp
index a0e3319af25d95d44e7df7e1143748b07823c1af..053f13789bd3e52c52b4c9f9f4d44f58ee5e8d4d 100644 (file)
@@ -17,8 +17,6 @@
  */
 
 
-/* $ModDesc: Provides a SATOPIC command */
-
 #include "inspircd.h"
 
 /** Handle /SATOPIC
@@ -40,10 +38,8 @@ class CommandSATopic : public Command
 
                if(target)
                {
-                       std::string newTopic = parameters[1];
-
-                       // 3rd parameter overrides access checks
-                       target->SetTopic(user, newTopic, true);
+                       const std::string& newTopic = parameters[1];
+                       target->SetTopic(user, newTopic);
                        ServerInstance->SNO->WriteGlobalSno('a', user->nick + " used SATOPIC on " + target->name + ", new topic: " + newTopic);
 
                        return CMD_SUCCESS;
@@ -63,14 +59,14 @@ class ModuleSATopic : public Module
        ModuleSATopic()
        : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
        }
 
-       virtual ~ModuleSATopic()
+       void init() CXX11_OVERRIDE
        {
+               ServerInstance->Modules->AddService(cmd);
        }
 
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides a SATOPIC command", VF_VENDOR);
        }