X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_satopic.cpp;h=053f13789bd3e52c52b4c9f9f4d44f58ee5e8d4d;hb=e950f568d0f571e9475aa38177486468714de4d3;hp=3a883421adbe2bd6e4dad1460a4c4c9ea6bc8abc;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_satopic.cpp b/src/modules/m_satopic.cpp index 3a883421a..053f13789 100644 --- a/src/modules/m_satopic.cpp +++ b/src/modules/m_satopic.cpp @@ -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; @@ -65,16 +61,12 @@ class ModuleSATopic : public Module { } - void init() - { - 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); }