summaryrefslogtreecommitdiff
path: root/src/modules/m_satopic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_satopic.cpp')
-rw-r--r--src/modules/m_satopic.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/modules/m_satopic.cpp b/src/modules/m_satopic.cpp
index ae1c19d91..4a6f85536 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,17 +38,15 @@ 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;
}
else
{
- user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
+ user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", parameters[0].c_str());
return CMD_FAILURE;
}
}
@@ -65,16 +61,7 @@ class ModuleSATopic : public Module
{
}
- void init()
- {
- ServerInstance->Modules->AddService(cmd);
- }
-
- virtual ~ModuleSATopic()
- {
- }
-
- virtual Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides a SATOPIC command", VF_VENDOR);
}