summaryrefslogtreecommitdiff
path: root/modules/operserv
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-02-06 14:23:18 -0500
committerAdam <Adam@anope.org>2017-02-06 14:23:18 -0500
commit8b694bc392c36551e428b84454efb81cdbc8bcd3 (patch)
treeca3d1ca8aadac280c149518134de4208f91dad84 /modules/operserv
parent9ad06f49bbb3824139b0c0ee0a74898a18c8f735 (diff)
Track override in CommandSource and use it in the logger
Diffstat (limited to 'modules/operserv')
-rw-r--r--modules/operserv/akill.cpp10
-rw-r--r--modules/operserv/chankill.cpp2
-rw-r--r--modules/operserv/config.cpp4
-rw-r--r--modules/operserv/defcon.cpp2
-rw-r--r--modules/operserv/dns.cpp22
-rw-r--r--modules/operserv/forbid.cpp4
-rw-r--r--modules/operserv/ignore.cpp8
-rw-r--r--modules/operserv/info.cpp6
-rw-r--r--modules/operserv/jupe.cpp2
-rw-r--r--modules/operserv/kick.cpp2
-rw-r--r--modules/operserv/kill.cpp2
-rw-r--r--modules/operserv/list.cpp8
-rw-r--r--modules/operserv/login.cpp4
-rw-r--r--modules/operserv/logsearch.cpp2
-rw-r--r--modules/operserv/mode.cpp4
-rw-r--r--modules/operserv/modinfo.cpp6
-rw-r--r--modules/operserv/module.cpp6
-rw-r--r--modules/operserv/news.cpp6
-rw-r--r--modules/operserv/noop.cpp4
-rw-r--r--modules/operserv/oper.cpp4
-rw-r--r--modules/operserv/reload.cpp2
-rw-r--r--modules/operserv/session.cpp8
-rw-r--r--modules/operserv/set.cpp20
-rw-r--r--modules/operserv/shutdown.cpp4
-rw-r--r--modules/operserv/stats.cpp2
-rw-r--r--modules/operserv/svs.cpp8
-rw-r--r--modules/operserv/sxline.cpp14
27 files changed, 83 insertions, 83 deletions
diff --git a/modules/operserv/akill.cpp b/modules/operserv/akill.cpp
index 0af4a36c5..a9d6c4b2f 100644
--- a/modules/operserv/akill.cpp
+++ b/modules/operserv/akill.cpp
@@ -150,7 +150,7 @@ class CommandOSAKill : public Command
if (percent > 95) // XXX make this configurable..
{
source.Reply(_("\002{0}\002 coverage is too wide; Please use a more specific mask."), mask);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} and tried to akill {0}% of the network ({1} users)"),
+ logger.Admin(source, _("{source} used {command} and tried to akill {0}% of the network ({1} users)"),
95, affected);
x->Delete();
return;
@@ -170,7 +170,7 @@ class CommandOSAKill : public Command
source.Reply(_("\002{0}\002 added to the akill list."), mask);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0} ({1}), expires in {2} [affects {3} user(s) ({4}%)]"),
+ logger.Admin(source, _("{source} used {command} on {0} ({1}), expires in {2} [affects {3} user(s) ({4}%)]"),
mask, x->GetReason(), expires ? Anope::Duration(expires - Anope::CurTime) : "never", affected, percent);
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
@@ -204,7 +204,7 @@ class CommandOSAKill : public Command
if (!x)
return;
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove {0} from the akill list"), x->GetMask());
+ logger.Admin(source, _("{source} used {command} to remove {0} from the akill list"), x->GetMask());
++deleted;
x->Delete();
@@ -233,7 +233,7 @@ class CommandOSAKill : public Command
{
EventManager::Get()->Dispatch(&Event::DelXLine::OnDelXLine, source, x, akills);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove {0} from the akill list"), x->GetMask());
+ logger.Admin(source, _("{source} used {command} to remove {0} from the akill list"), x->GetMask());
source.Reply(_("\002{0}\002 deleted from the akill list."), x->GetMask());
x->Delete();
@@ -348,7 +348,7 @@ class CommandOSAKill : public Command
x->Delete();
}
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to CLEAR the akill list"));
+ logger.Admin(source, _("{source} used {command} to CLEAR the akill list"));
source.Reply(_("The akill list has been cleared."));
diff --git a/modules/operserv/chankill.cpp b/modules/operserv/chankill.cpp
index 32079f61d..d395448ac 100644
--- a/modules/operserv/chankill.cpp
+++ b/modules/operserv/chankill.cpp
@@ -109,7 +109,7 @@ class CommandOSChanKill : public Command
akills->OnMatch(uc->user, x);
}
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to {0} ({1})"), c->name, realreason);
+ logger.Admin(source, _("{source} used {command} to {0} ({1})"), c->name, realreason);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
diff --git a/modules/operserv/config.cpp b/modules/operserv/config.cpp
index 2b6ce015d..5c41b8ce2 100644
--- a/modules/operserv/config.cpp
+++ b/modules/operserv/config.cpp
@@ -52,7 +52,7 @@ class CommandOSConfig : public Command
block->Set(params[2], params[3]);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to change the configuration value of {0}:{1} to {2}"),
+ logger.Admin(source, _("{source} used {command} to change the configuration value of {0}:{1} to {2}"),
params[1], params[2], params[3]);
source.Reply(_("Value of \002{0}:{1}\002 changed to \002{2}\002."), params[1], params[2], params[3]);
}
@@ -61,7 +61,7 @@ class CommandOSConfig : public Command
/* Blocks we should show */
const Anope::string show_blocks[] = { "serverinfo", "networkinfo", "options", "" };
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to view the configuration"));
+ logger.Admin(source, _("{source} used {command} to view the configuration"));
for (unsigned i = 0; !show_blocks[i].empty(); ++i)
{
diff --git a/modules/operserv/defcon.cpp b/modules/operserv/defcon.cpp
index 3f24b2b63..ba4e213ef 100644
--- a/modules/operserv/defcon.cpp
+++ b/modules/operserv/defcon.cpp
@@ -225,7 +225,7 @@ class CommandOSDefcon : public Command
source.Reply(_("Services are now at defcon \002{0}\002."), DConfig.defaultlevel);
this->SendLevels(source);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to change defcon level to {0}"), newLevel);
+ logger.Admin(source, _("{source} used {command} to change defcon level to {0}"), newLevel);
/* Global notice the user what is happening. Also any Message that
the Admin would like to add. Set in config file. */
diff --git a/modules/operserv/dns.cpp b/modules/operserv/dns.cpp
index b485ae440..2968ba190 100644
--- a/modules/operserv/dns.cpp
+++ b/modules/operserv/dns.cpp
@@ -383,7 +383,7 @@ class CommandOSDNS : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add zone {0}"), zone);
+ logger.Admin(source, _("{source} used {command} to add zone {0}"), zone);
DNSZone *z = Serialize::New<DNSZone *>();
z->SetName(zone);
@@ -404,7 +404,7 @@ class CommandOSDNS : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to delete zone {0}"), z->GetName());
+ logger.Admin(source, _("{source} used {command} to delete zone {0}"), z->GetName());
for (DNSZoneMembership *mem : z->GetRefs<DNSZoneMembership *>())
mem->Delete();
@@ -459,7 +459,7 @@ class CommandOSDNS : public Command
manager->Notify(zone);
}
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add server {0} to zone {1}"), s->GetName(), z->GetName());
+ logger.Admin(source, _("{source} used {command} to add server {0} to zone {1}"), s->GetName(), z->GetName());
source.Reply(_("Server \002{0}\002 added to zone \002{1}\002."), s->GetName(), z->GetName());
}
@@ -481,7 +481,7 @@ class CommandOSDNS : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add server {2}"), s->GetName());
+ logger.Admin(source, _("{source} used {command} to add server {2}"), s->GetName());
source.Reply(_("Added server \002{0}\002."), s->GetName());
}
@@ -498,7 +498,7 @@ class CommandOSDNS : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add server {0} to zone {1}"), s->GetName(), z->GetName());
+ logger.Admin(source, _("{source} used {command} to add server {0} to zone {1}"), s->GetName(), z->GetName());
DNSZoneMembership *mem = Serialize::New<DNSZoneMembership *>();
mem->SetServer(s);
@@ -542,7 +542,7 @@ class CommandOSDNS : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove server {0} to zone {1}"), s->GetName(), z->GetName());
+ logger.Admin(source, _("{source} used {command} to remove server {0} to zone {1}"), s->GetName(), z->GetName());
if (manager)
{
@@ -570,7 +570,7 @@ class CommandOSDNS : public Command
if (manager)
manager->UpdateSerial();
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to delete server {0}"), s->GetName());
+ logger.Admin(source, _("{source} used {command} to delete server {0}"), s->GetName());
source.Reply(_("Removed server \002{0}\002."), s->GetName());
s->Delete();
@@ -609,7 +609,7 @@ class CommandOSDNS : public Command
source.Reply(_("Added IP \002{0}\002 to \002{1}\002."), params[2], s->GetName());
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add IP {0} to {1}"), params[2], s->GetName());
+ logger.Admin(source, _("{source} used {command} to add IP {0} to {1}"), params[2], s->GetName());
if (s->Active() && manager)
{
@@ -639,7 +639,7 @@ class CommandOSDNS : public Command
source.Reply(_("Removed IP \002{0}\002 from \002{1}\002."), params[2], s->GetName());
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add IP {0} to {1}"), params[2], s->GetName());
+ logger.Admin(source, _("{source} used {command} to add IP {0} to {1}"), params[2], s->GetName());
if (s->GetRefs<DNSIP *>().empty())
{
@@ -730,7 +730,7 @@ class CommandOSDNS : public Command
source.Reply(_("Pooled \002{0}\002."), s->GetName());
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to pool {0}"), s->GetName());
+ logger.Admin(source, _("{source} used {command} to pool {0}"), s->GetName());
}
@@ -757,7 +757,7 @@ class CommandOSDNS : public Command
source.Reply(_("Depooled \002{0}\002."), s->GetName());
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to depool {0}"), s->GetName());
+ logger.Admin(source, _("{source} used {command} to depool {0}"), s->GetName());
}
public:
diff --git a/modules/operserv/forbid.cpp b/modules/operserv/forbid.cpp
index 928aa2685..2c5df9907 100644
--- a/modules/operserv/forbid.cpp
+++ b/modules/operserv/forbid.cpp
@@ -270,7 +270,7 @@ class CommandOSForbid : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add a forbid on {0} of type {1}"), entry, subcommand);
+ logger.Admin(source, _("{source} used {command} to add a forbid on {0} of type {1}"), entry, subcommand);
source.Reply(_("Added a forbid on \002{0}\002 of type \002{1}\002 to expire on \002{2}\002."), entry, subcommand.lower(), expiryt ? Anope::strftime(expiryt, source.GetAccount()) : "never");
@@ -382,7 +382,7 @@ class CommandOSForbid : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove forbid on {0} of type {1}"), d->GetMask(), subcommand);
+ logger.Admin(source, _("{source} used {command} to remove forbid on {0} of type {1}"), d->GetMask(), subcommand);
source.Reply(_("\002{0}\002 deleted from the \002{1}\002 forbid list."), d->GetMask(), subcommand);
d->Delete();
diff --git a/modules/operserv/ignore.cpp b/modules/operserv/ignore.cpp
index a5c39135d..cfc91b4d3 100644
--- a/modules/operserv/ignore.cpp
+++ b/modules/operserv/ignore.cpp
@@ -245,13 +245,13 @@ class CommandOSIgnore : public Command
{
source.Reply(_("\002{0}\002 will now permanently be ignored."), mask);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add a permanent ignore for {0}"), mask);
+ logger.Admin(source, _("{source} used {command} to add a permanent ignore for {0}"), mask);
}
else
{
source.Reply(_("\002{0}\002 will now be ignored for \002{1}\002."), mask, Anope::Duration(t, source.GetAccount()));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add an ignore on {0} for {1}"), mask, Anope::Duration(t));
+ logger.Admin(source, _("{source} used {command} to add an ignore on {0} for {1}"), mask, Anope::Duration(t));
}
}
@@ -323,7 +323,7 @@ class CommandOSIgnore : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove an ignore on {0}"), mask);
+ logger.Admin(source, _("{source} used {command} to remove an ignore on {0}"), mask);
source.Reply(_("\002{0}\002 will no longer be ignored."), mask);
ign->Delete();
@@ -337,7 +337,7 @@ class CommandOSIgnore : public Command
for (Ignore *ign : Serialize::GetObjects<Ignore *>())
ign->Delete();
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to CLEAR the ignore list"));
+ logger.Admin(source, _("{source} used {command} to CLEAR the ignore list"));
source.Reply(_("Ignore list has been cleared."));
}
diff --git a/modules/operserv/info.cpp b/modules/operserv/info.cpp
index ff88a07d1..c052c46ae 100644
--- a/modules/operserv/info.cpp
+++ b/modules/operserv/info.cpp
@@ -172,7 +172,7 @@ class CommandOSInfo : public Command
source.Reply(_("Added info to \002{0}\002."), target);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add oper information to {0}: {1}"), target, info);
+ logger.Admin(source, _("{source} used {command} to add oper information to {0}: {1}"), target, info);
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
@@ -200,7 +200,7 @@ class CommandOSInfo : public Command
source.Reply(_("Deleted info from \002{0}\002."), target);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove oper information from {0}: {1}"), target, info);
+ logger.Admin(source, _("{source} used {command} to remove oper information from {0}: {1}"), target, info);
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
@@ -225,7 +225,7 @@ class CommandOSInfo : public Command
source.Reply(_("Cleared info from \002{0}\002."), target);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to clear oper information for {0}"), target);
+ logger.Admin(source, _("{source} used {command} to clear oper information for {0}"), target);
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
diff --git a/modules/operserv/jupe.cpp b/modules/operserv/jupe.cpp
index 1d31ab1b4..42f835e1d 100644
--- a/modules/operserv/jupe.cpp
+++ b/modules/operserv/jupe.cpp
@@ -63,7 +63,7 @@ class CommandOSJupe : public Command
Server *juped_server = new Server(Me, jserver, 1, rbuf, sid, true);
IRCD->Send<messages::MessageServer>(juped_server);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0} ({1}"), jserver, rbuf);
+ logger.Admin(source, _("{source} used {command} on {0} ({1}"), jserver, rbuf);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
diff --git a/modules/operserv/kick.cpp b/modules/operserv/kick.cpp
index ea9820dc2..e556bcbda 100644
--- a/modules/operserv/kick.cpp
+++ b/modules/operserv/kick.cpp
@@ -60,7 +60,7 @@ class CommandOSKick : public Command
return;
}
- logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0} in {1} ({2})"), u2->nick, c->name, s);
+ logger.Admin(source, _("{source} used {command} on {0} in {1} ({2})"), u2->nick, c->name, s);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
diff --git a/modules/operserv/kill.cpp b/modules/operserv/kill.cpp
index 42571bc10..ce109f15a 100644
--- a/modules/operserv/kill.cpp
+++ b/modules/operserv/kill.cpp
@@ -51,7 +51,7 @@ class CommandOSKill : public Command
if (Config->GetModule("operserv/main")->Get<bool>("addakiller"))
reason = "(" + source.GetNick() + ") " + reason;
- logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0} for {1}"), u2->nick, reason);
+ logger.Admin(source, _("{source} used {command} on {0} for {1}"), u2->nick, reason);
u2->Kill(*source.service, reason);
}
diff --git a/modules/operserv/list.cpp b/modules/operserv/list.cpp
index e149c7e4b..39ca2288b 100644
--- a/modules/operserv/list.cpp
+++ b/modules/operserv/list.cpp
@@ -36,9 +36,9 @@ class CommandOSChanList : public Command
User *u2;
if (!pattern.empty())
- logger.Command(LogType::ADMIN, source, _("{source} used {command} for {0}"), pattern);
+ logger.Admin(source, _("{source} used {command} for {0}"), pattern);
else
- logger.Command(LogType::ADMIN, source, _("{source} used {command}"));
+ logger.Admin(source, _("{source} used {command}"));
if (!opt.empty() && opt.equals_ci("SECRET"))
{
@@ -138,9 +138,9 @@ class CommandOSUserList : public Command
std::set<Anope::string> modes;
if (!pattern.empty())
- logger.Command(LogType::ADMIN, source, _("{source} used {command} for {0}"), pattern);
+ logger.Admin(source, _("{source} used {command} for {0}"), pattern);
else
- logger.Command(LogType::ADMIN, source, _("{source} used {command}"));
+ logger.Admin(source, _("{source} used {command}"));
if (!opt.empty() && opt.equals_ci("INVISIBLE"))
modes.insert("INVIS");
diff --git a/modules/operserv/login.cpp b/modules/operserv/login.cpp
index f9dcdd38f..060b8f1eb 100644
--- a/modules/operserv/login.cpp
+++ b/modules/operserv/login.cpp
@@ -59,7 +59,7 @@ class CommandOSLogin : public Command
return;
}
- logger.Command(LogType::ADMIN, source, _("{source} used {command} and successfully identified to {0}"), source.service->nick);
+ logger.Admin(source, _("{source} used {command} and successfully identified to {0}"), source.service->nick);
u->Extend<bool>("os_login", true);
source.Reply(_("Password accepted."));
@@ -107,7 +107,7 @@ class CommandOSLogout : public Command
return;
}
- logger.Command(LogType::ADMIN, source, _("{source} used {command}"));
+ logger.Admin(source, _("{source} used {command}"));
u->Shrink<bool>("os_login");
source.Reply(_("You have been logged out."));
diff --git a/modules/operserv/logsearch.cpp b/modules/operserv/logsearch.cpp
index e936a8f6d..360ff6fd5 100644
--- a/modules/operserv/logsearch.cpp
+++ b/modules/operserv/logsearch.cpp
@@ -95,7 +95,7 @@ class CommandOSLogSearch : public Command
for (; i < params.size(); ++i)
search_string += " " + params[i];
- logger.Command(LogType::ADMIN, source, _("{source} used {command} for {2}"), search_string);
+ logger.Admin(source, _("{source} used {command} for {2}"), search_string);
const Anope::string &logfile_name = Config->GetModule(this->GetOwner())->Get<Anope::string>("logname");
std::list<Anope::string> matches;
diff --git a/modules/operserv/mode.cpp b/modules/operserv/mode.cpp
index 6e7e0e157..84b4ba6fb 100644
--- a/modules/operserv/mode.cpp
+++ b/modules/operserv/mode.cpp
@@ -140,7 +140,7 @@ class CommandOSMode : public Command
}
if (!log_modes.replace_all_cs("+", "").replace_all_cs("-", "").empty())
- logger.Command(LogType::ADMIN, source, _("{source} used {command} {0} on {1}"), log_modes + log_params, c ? c->name : target);
+ logger.Admin(source, _("{source} used {command} {0} on {1}"), log_modes + log_params, c ? c->name : target);
}
}
@@ -179,7 +179,7 @@ class CommandOSUMode : public Command
u2->SendMessage(*source.service, _("\002{0}\002 changed your usermodes to \002{1}\002."), source.GetNick(), modes);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0}"), target);
+ logger.Admin(source, _("{source} used {command} on {0}"), target);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
diff --git a/modules/operserv/modinfo.cpp b/modules/operserv/modinfo.cpp
index e1860583c..074d6ed42 100644
--- a/modules/operserv/modinfo.cpp
+++ b/modules/operserv/modinfo.cpp
@@ -32,7 +32,7 @@ class CommandOSModInfo : public Command
{
const Anope::string &file = params[0];
- logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0}"), file);
+ logger.Admin(source, _("{source} used {command} on {0}"), file);
Module *m = ModuleManager::FindModule(file);
if (m == nullptr)
@@ -95,9 +95,9 @@ class CommandOSModList : public Command
const Anope::string &param = !params.empty() ? params[0] : "";
if (!param.empty())
- logger.Command(LogType::ADMIN, source, _("{source} used {command} for {0}"), param);
+ logger.Admin(source, _("{source} used {command} for {0}"), param);
else
- logger.Command(LogType::ADMIN, source, _("{source} used {command}"),
+ logger.Admin(source, _("{source} used {command}"),
source.GetSource(), source.GetCommand());
bool third = false, vendor = false, extra = false, database = false, encryption = false, pseudoclient = false, protocol = false;
diff --git a/modules/operserv/module.cpp b/modules/operserv/module.cpp
index 669638a51..16e34fe04 100644
--- a/modules/operserv/module.cpp
+++ b/modules/operserv/module.cpp
@@ -35,7 +35,7 @@ class CommandOSModLoad : public Command
ModuleReturn status = ModuleManager::LoadModule(mname, source.GetUser());
if (status == MOD_ERR_OK)
{
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to load module {0}"), mname);
+ logger.Admin(source, _("{source} used {command} to load module {0}"), mname);
source.Reply(_("Module \002{0}\002 loaded."), mname);
}
else if (status == MOD_ERR_EXISTS)
@@ -101,7 +101,7 @@ class CommandOSModReLoad : public Command
status = ModuleManager::LoadModule(mname, source.GetUser());
if (status == MOD_ERR_OK)
{
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to reload module {0}"), mname);
+ logger.Admin(source, _("{source} used {command} to reload module {0}"), mname);
source.Reply(_("Module \002{0}\002 reloaded."), mname);
}
else
@@ -155,7 +155,7 @@ class CommandOSModUnLoad : public Command
if (status == MOD_ERR_OK)
{
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to unload module {0}"), mname);
+ logger.Admin(source, _("{source} used {command} to unload module {0}"), mname);
source.Reply(_("Module \002{0}\002 unloaded."), mname);
}
else
diff --git a/modules/operserv/news.cpp b/modules/operserv/news.cpp
index 3a829f0c3..65f5ca070 100644
--- a/modules/operserv/news.cpp
+++ b/modules/operserv/news.cpp
@@ -221,7 +221,7 @@ class NewsBase : public Command
source.Reply(msgs[MSG_ADDED]);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add news item: {0}"), text);
+ logger.Admin(source, _("{source} used {command} to add news item: {0}"), text);
}
void DoDel(CommandSource &source, const std::vector<Anope::string> &params, NewsType ntype, const char **msgs)
@@ -254,7 +254,7 @@ class NewsBase : public Command
NewsItem *item = list[num - 1];
source.Reply(msgs[MSG_DELETED], num);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to delete news item {0}"), item->GetText());
+ logger.Admin(source, _("{source} used {command} to delete news item {0}"), item->GetText());
item->Delete();
@@ -271,7 +271,7 @@ class NewsBase : public Command
n->Delete();
source.Reply(msgs[MSG_DELETED_ALL]);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to delete all news items"));
+ logger.Admin(source, _("{source} used {command} to delete all news items"));
}
}
diff --git a/modules/operserv/noop.cpp b/modules/operserv/noop.cpp
index ce3ce9f9b..fd97d85e8 100644
--- a/modules/operserv/noop.cpp
+++ b/modules/operserv/noop.cpp
@@ -53,7 +53,7 @@ class CommandOSNOOP : public Command
IRCD->Send<messages::NOOP>(s, true);
s->Extend<Anope::string>("noop", source.GetNick());
- logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0}"), s->GetName());
+ logger.Admin(source, _("{source} used {command} on {0}"), s->GetName());
source.Reply(_("All operators from \002{0}\002 have been removed."), s->GetName());
@@ -72,7 +72,7 @@ class CommandOSNOOP : public Command
s->Shrink<Anope::string>("noop");
IRCD->Send<messages::NOOP>(s, false);
- logger.Command(LogType::ADMIN, source, _("{source} used {command} REVOKE on {0}"), s->GetName());
+ logger.Admin(source, _("{source} used {command} REVOKE on {0}"), s->GetName());
source.Reply(_("All O:lines of \002{0}\002 have been reset."), s->GetName());
}
diff --git a/modules/operserv/oper.cpp b/modules/operserv/oper.cpp
index 00c7e0f4d..f1f1632de 100644
--- a/modules/operserv/oper.cpp
+++ b/modules/operserv/oper.cpp
@@ -97,7 +97,7 @@ class CommandOSOper : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to add {0} as an oper of type {1}"), na->GetNick(), ot->GetName());
+ logger.Admin(source, _("{source} used {command} to add {0} as an oper of type {1}"), na->GetNick(), ot->GetName());
source.Reply("\002{0}\002 (\002{1}\002) added to the \002{2}\002 list.", na->GetNick(), na->GetAccount()->GetDisplay(), ot->GetName());
}
@@ -138,7 +138,7 @@ class CommandOSOper : public Command
if (Anope::ReadOnly)
source.Reply(_("Services are in read-only mode. Any changes made may not persist."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove {0}"), na->GetNick());
+ logger.Admin(source, _("{source} used {command} to remove {0}"), na->GetNick());
source.Reply(_("Oper privileges removed from \002{0}\002 (\002{1}\002)."), na->GetNick(), na->GetAccount()->GetDisplay());
}
diff --git a/modules/operserv/reload.cpp b/modules/operserv/reload.cpp
index fa79cd0d7..9f3503f01 100644
--- a/modules/operserv/reload.cpp
+++ b/modules/operserv/reload.cpp
@@ -31,7 +31,7 @@ class CommandOSReload : public Command
{
try
{
- logger.Command(LogType::ADMIN, source, _("{source} used {command}"));
+ logger.Admin(source, _("{source} used {command}"));
Configuration::Conf *new_config = new Configuration::Conf();
Configuration::Conf *old = Config;
diff --git a/modules/operserv/session.cpp b/modules/operserv/session.cpp
index 0b6f207a5..1f9827f21 100644
--- a/modules/operserv/session.cpp
+++ b/modules/operserv/session.cpp
@@ -303,7 +303,7 @@ class CommandOSSession : public Command
{
const Anope::string &cmd = params[0];
- logger.Command(LogType::ADMIN, source, _("{source} used {command} {0} {1}"), cmd, params[1]);
+ logger.Admin(source, _("{source} used {command} {0} {1}"), cmd, params[1]);
if (!session_limit)
source.Reply(_("Session limiting is disabled."));
@@ -422,7 +422,7 @@ class CommandOSException : public Command
if (MOD_RESULT == EVENT_STOP)
return;
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to set the session limit for {0} to {1}"), mask, limit);
+ logger.Admin(source, _("{source} used {command} to set the session limit for {0} to {1}"), mask, limit);
source.Reply(_("Session limit for \002{0}\002 set to \002{1}\002."), mask, limit);
if (Anope::ReadOnly)
@@ -453,7 +453,7 @@ class CommandOSException : public Command
Exception *e = exceptions[number - 1];
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove the session limit exception for {0}"), e->GetMask());
+ logger.Admin(source, _("{source} used {command} to remove the session limit exception for {0}"), e->GetMask());
++deleted;
DoDel(source, e);
@@ -474,7 +474,7 @@ class CommandOSException : public Command
for (Exception *e : Serialize::GetObjects<Exception *>())
if (mask.equals_ci(e->GetMask()))
{
- logger.Command(LogType::ADMIN, source, _("{source} used {command} to remove the session limit exception for {0}"), e->GetMask());
+ logger.Admin(source, _("{source} used {command} to remove the session limit exception for {0}"), e->GetMask());
DoDel(source, e);
source.Reply(_("\002{0}\002 deleted from session-limit exception list."), mask);
diff --git a/modules/operserv/set.cpp b/modules/operserv/set.cpp
index f8a63dca8..41c354814 100644
--- a/modules/operserv/set.cpp
+++ b/modules/operserv/set.cpp
@@ -24,7 +24,7 @@ class CommandOSSet : public Command
private:
void DoList(CommandSource &source)
{
- logger.Command(LogType::ADMIN, source, _("{source} used {command} LIST"));
+ logger.Admin(source, _("{source} used {command} LIST"));
const char *str;
@@ -51,13 +51,13 @@ class CommandOSSet : public Command
if (setting.equals_ci("ON"))
{
Anope::ReadOnly = true;
- logger.Command(LogType::ADMIN, source, _("{source} used {command} READONLY ON"));
+ logger.Admin(source, _("{source} used {command} READONLY ON"));
source.Reply(_("Services are now in \002read-only\002 mode."));
}
else if (setting.equals_ci("OFF"))
{
Anope::ReadOnly = false;
- logger.Command(LogType::ADMIN, source, _("{source} used {command} READONLY OFF"));
+ logger.Admin(source, _("{source} used {command} READONLY OFF"));
source.Reply(_("Services are now in \002read-write\002 mode."));
}
else
@@ -95,14 +95,14 @@ class CommandOSSet : public Command
{
source.GetUser()->super_admin = true;
source.Reply(_("You are now a super admin."));
- logger.Command(LogType::ADMIN, source, _("{source} used {command} SUPERADMIN ON"),
+ logger.Admin(source, _("{source} used {command} SUPERADMIN ON"),
source.GetSource(), source.GetComma