summaryrefslogtreecommitdiff
path: root/src/modules/m_sapart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sapart.cpp')
-rw-r--r--src/modules/m_sapart.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 89256e0e4..c6137c561 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -21,8 +21,6 @@
#include "inspircd.h"
-/* $ModDesc: Provides command SAPART to force-part users from a channel. */
-
/** Handle /SAPART
*/
class CommandSapart : public Command
@@ -31,7 +29,7 @@ class CommandSapart : public Command
CommandSapart(Module* Creator) : Command(Creator,"SAPART", 2, 3)
{
flags_needed = 'o'; Penalty = 0; syntax = "<nick> <channel> [reason]";
- TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
+ TRANSLATE3(TR_NICK, TR_TEXT, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -74,7 +72,7 @@ class CommandSapart : public Command
}
else
{
- user->WriteServ("NOTICE %s :*** Unable to make %s part %s",user->nick.c_str(), dest->nick.c_str(), parameters[1].c_str());
+ user->WriteNotice("*** Unable to make " + dest->nick + " part " + parameters[1]);
return CMD_FAILURE;
}
}
@@ -84,7 +82,7 @@ class CommandSapart : public Command
}
else
{
- user->WriteServ("NOTICE %s :*** Invalid nickname or channel", user->nick.c_str());
+ user->WriteNotice("*** Invalid nickname or channel");
}
return CMD_FAILURE;
@@ -109,21 +107,15 @@ class ModuleSapart : public Module
{
}
- void init()
+ void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(cmd);
}
- virtual ~ModuleSapart()
- {
- }
-
- virtual Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides command SAPART to force-part users from a channel.", VF_OPTCOMMON | VF_VENDOR);
}
-
};
MODULE_INIT(ModuleSapart)
-