summaryrefslogtreecommitdiff
path: root/src/modules/m_sanick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sanick.cpp')
-rw-r--r--src/modules/m_sanick.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index 4e4be77ae..82e8508dd 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -21,8 +21,6 @@
#include "inspircd.h"
-/* $ModDesc: Provides support for SANICK command */
-
/** Handle /SANICK
*/
class CommandSanick : public Command
@@ -32,7 +30,7 @@ class CommandSanick : public Command
{
allow_empty_last_param = false;
flags_needed = 'o'; Penalty = 0; syntax = "<nick> <new-nick>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -50,13 +48,13 @@ class CommandSanick : public Command
if ((!target) || (target->registered != REG_ALL))
{
- user->WriteServ("NOTICE %s :*** No such nickname: '%s'", user->nick.c_str(), parameters[0].c_str());
+ user->WriteNotice("*** No such nickname: '" + parameters[0] + "'");
return CMD_FAILURE;
}
- if (!ServerInstance->IsNick(parameters[1].c_str(), ServerInstance->Config->Limits.NickMax))
+ if (!ServerInstance->IsNick(parameters[1]))
{
- user->WriteServ("NOTICE %s :*** Invalid nickname '%s'", user->nick.c_str(), parameters[1].c_str());
+ user->WriteNotice("*** Invalid nickname '" + parameters[1] + "'");
return CMD_FAILURE;
}
}
@@ -98,20 +96,16 @@ class ModuleSanick : public Module
{
}
- void init()
+ void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(cmd);
}
- virtual ~ModuleSanick()
- {
- }
-
- virtual Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides support for SANICK command", VF_OPTCOMMON | VF_VENDOR);
}
-
};
MODULE_INIT(ModuleSanick)
+