X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_satopic.cpp;h=053f13789bd3e52c52b4c9f9f4d44f58ee5e8d4d;hb=e950f568d0f571e9475aa38177486468714de4d3;hp=a0e3319af25d95d44e7df7e1143748b07823c1af;hpb=8e62584e73a554f20b5d6fb470655e42e5c3d0f8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_satopic.cpp b/src/modules/m_satopic.cpp index a0e3319af..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; @@ -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); }