summaryrefslogtreecommitdiff
path: root/modules/commands/os_module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/os_module.cpp')
-rw-r--r--modules/commands/os_module.cpp39
1 files changed, 14 insertions, 25 deletions
diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp
index 826fcabbb..14bc897e3 100644
--- a/modules/commands/os_module.cpp
+++ b/modules/commands/os_module.cpp
@@ -28,22 +28,17 @@ class CommandOSModLoad : public Command
if (status == MOD_ERR_OK)
{
Log(LOG_ADMIN, source, this) << "to load module " << mname;
- source.Reply(_("Module \002%s\002 loaded."), mname.c_str());
+ source.Reply(_("Module \002{0}\002 loaded."), mname);
}
else if (status == MOD_ERR_EXISTS)
- source.Reply(_("Module \002%s\002 is already loaded."), mname.c_str());
+ source.Reply(_("Module \002{0}\002 is already loaded."), mname);
else
- source.Reply(_("Unable to load module \002%s\002."), mname.c_str());
-
- return;
+ source.Reply(_("Unable to load module \002{0}\002."), mname);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
{
- this->SendSyntax(source);
- source.Reply(" ");
- source.Reply(_("This command loads the module named \037modname\037 from the modules\n"
- "directory."));
+ source.Reply(_("This command loads the module named \037modname\037."));
return true;
}
};
@@ -64,20 +59,20 @@ class CommandOSModReLoad : public Command
Module *m = ModuleManager::FindModule(mname);
if (!m)
{
- source.Reply(_("Module \002%s\002 isn't loaded."), mname.c_str());
+ source.Reply(_("Module \002{0}\002 isn't loaded."), mname);
return;
}
if (!m->handle || m->GetPermanent())
{
- source.Reply(_("Unable to remove module \002%s\002."), m->name.c_str());
+ source.Reply(_("Unable to remove module \002{0}\002."), m->name);
return;
}
Module *protocol = ModuleManager::FindFirstOf(PROTOCOL);
if (m->type == PROTOCOL && m != protocol)
{
- source.Reply(_("You can not reload this module directly, instead reload %s."), protocol ? protocol->name.c_str() : "(unknown)");
+ source.Reply(_("You can not reload this module directly, instead reload {0}."), protocol ? protocol->name : "(unknown)");
return;
}
@@ -87,7 +82,7 @@ class CommandOSModReLoad : public Command
if (status != MOD_ERR_OK)
{
- source.Reply(_("Unable to remove module \002%s\002."), mname.c_str());
+ source.Reply(_("Unable to remove module \002{0}\002."), mname);
return;
}
@@ -95,7 +90,7 @@ class CommandOSModReLoad : public Command
if (status == MOD_ERR_OK)
{
Log(LOG_ADMIN, source, this) << "to reload module " << mname;
- source.Reply(_("Module \002%s\002 reloaded."), mname.c_str());
+ source.Reply(_("Module \002{0}\002 reloaded."), mname);
}
else
{
@@ -105,16 +100,12 @@ class CommandOSModReLoad : public Command
Anope::Quitting = true;
}
else
- source.Reply(_("Unable to load module \002%s\002."), mname.c_str());
+ source.Reply(_("Unable to load module \002{0}\002."), mname);
}
-
- return;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
{
- this->SendSyntax(source);
- source.Reply(" ");
source.Reply(_("This command reloads the module named \037modname\037."));
return true;
}
@@ -136,13 +127,13 @@ class CommandOSModUnLoad : public Command
Module *m = ModuleManager::FindModule(mname);
if (!m)
{
- source.Reply(_("Module \002%s\002 isn't loaded."), mname.c_str());
+ source.Reply(_("Module \002{0}\002 isn't loaded."), mname);
return;
}
if (!m->handle || m->GetPermanent() || m->type == PROTOCOL)
{
- source.Reply(_("Unable to remove module \002%s\002."), m->name.c_str());
+ source.Reply(_("Unable to remove module \002{0}\002."), m->name);
return;
}
@@ -153,18 +144,16 @@ class CommandOSModUnLoad : public Command
if (status == MOD_ERR_OK)
{
Log(LOG_ADMIN, source, this) << "to unload module " << mname;
- source.Reply(_("Module \002%s\002 unloaded."), mname.c_str());
+ source.Reply(_("Module \002{0}\002 unloaded."), mname);
}
else
- source.Reply(_("Unable to remove module \002%s\002."), mname.c_str());
+ source.Reply(_("Unable to remove module \002{0}\002."), mname);
return;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
{
- this->SendSyntax(source);
- source.Reply(" ");
source.Reply(_("This command unloads the module named \037modname\037."));
return true;
}