summaryrefslogtreecommitdiff
path: root/src/commands/cmd_unloadmodule.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-11-12 06:51:31 -0500
committerAdam <Adam@anope.org>2013-11-12 06:51:31 -0500
commit6c7a3ceb6c674a9af09da955ee0238e9291cf29a (patch)
treec9fd79d5814685e43f5d9ade75cad5f11da06364 /src/commands/cmd_unloadmodule.cpp
parent407f8ef1391e5d09e99e0abfc570389decc3ce2d (diff)
Use WriteNumeric() everywhere we send numerics and include the user's nick automatically
Diffstat (limited to 'src/commands/cmd_unloadmodule.cpp')
-rw-r--r--src/commands/cmd_unloadmodule.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands/cmd_unloadmodule.cpp b/src/commands/cmd_unloadmodule.cpp
index 29f454987..4e86d3ded 100644
--- a/src/commands/cmd_unloadmodule.cpp
+++ b/src/commands/cmd_unloadmodule.cpp
@@ -45,13 +45,13 @@ CmdResult CommandUnloadmodule::Handle (const std::vector<std::string>& parameter
if (!ServerInstance->Config->ConfValue("security")->getBool("allowcoreunload") &&
InspIRCd::Match(parameters[0], "cmd_*.so", ascii_case_insensitive_map))
{
- user->WriteNumeric(972, "%s %s :You cannot unload core commands!", user->nick.c_str(), parameters[0].c_str());
+ user->WriteNumeric(ERR_CANTUNLOADMODULE, "%s :You cannot unload core commands!", parameters[0].c_str());
return CMD_FAILURE;
}
if (parameters[0] == "cmd_unloadmodule.so" || parameters[0] == "cmd_loadmodule.so")
{
- user->WriteNumeric(972, "%s %s :You cannot unload module loading commands!", user->nick.c_str(), parameters[0].c_str());
+ user->WriteNumeric(ERR_CANTUNLOADMODULE, "%s :You cannot unload module loading commands!", parameters[0].c_str());
return CMD_FAILURE;
}
@@ -59,11 +59,11 @@ CmdResult CommandUnloadmodule::Handle (const std::vector<std::string>& parameter
if (m && ServerInstance->Modules->Unload(m))
{
ServerInstance->SNO->WriteGlobalSno('a', "MODULE UNLOADED: %s unloaded %s", user->nick.c_str(), parameters[0].c_str());
- user->WriteNumeric(973, "%s %s :Module successfully unloaded.",user->nick.c_str(), parameters[0].c_str());
+ user->WriteNumeric(RPL_UNLOADEDMODULE, "%s :Module successfully unloaded.", parameters[0].c_str());
}
else
{
- user->WriteNumeric(972, "%s %s :%s",user->nick.c_str(), parameters[0].c_str(),
+ user->WriteNumeric(ERR_CANTUNLOADMODULE, "%s :%s", parameters[0].c_str(),
m ? ServerInstance->Modules->LastError().c_str() : "No such module");
return CMD_FAILURE;
}