summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/os_list.cpp10
-rw-r--r--modules/commands/os_modinfo.cpp7
-rw-r--r--modules/commands/os_reload.cpp2
-rw-r--r--modules/commands/os_session.cpp5
-rw-r--r--modules/commands/os_shutdown.cpp3
-rw-r--r--modules/commands/os_stats.cpp2
-rw-r--r--modules/commands/os_update.cpp1
7 files changed, 30 insertions, 0 deletions
diff --git a/modules/commands/os_list.cpp b/modules/commands/os_list.cpp
index f0005e1da..b72e3acbd 100644
--- a/modules/commands/os_list.cpp
+++ b/modules/commands/os_list.cpp
@@ -27,6 +27,11 @@ class CommandOSChanList : public Command
std::set<Anope::string> modes;
User *u2;
+ if (!pattern.empty())
+ Log(LOG_ADMIN, source, this) << "for " << pattern;
+ else
+ Log(LOG_ADMIN, source, this);
+
if (!opt.empty() && opt.equals_ci("SECRET"))
{
modes.insert("SECRET");
@@ -129,6 +134,11 @@ class CommandOSUserList : public Command
Channel *c;
std::set<Anope::string> modes;
+ if (!pattern.empty())
+ Log(LOG_ADMIN, source, this) << "for " << pattern;
+ else
+ Log(LOG_ADMIN, source, this);
+
if (!opt.empty() && opt.equals_ci("INVISIBLE"))
modes.insert("INVIS");
diff --git a/modules/commands/os_modinfo.cpp b/modules/commands/os_modinfo.cpp
index 1ad03c7c0..3563185ae 100644
--- a/modules/commands/os_modinfo.cpp
+++ b/modules/commands/os_modinfo.cpp
@@ -24,6 +24,8 @@ class CommandOSModInfo : public Command
{
const Anope::string &file = params[0];
+ Log(LOG_ADMIN, source, this) << "on " << file;
+
Module *m = ModuleManager::FindModule(file);
if (m)
{
@@ -81,6 +83,11 @@ class CommandOSModList : public Command
{
const Anope::string &param = !params.empty() ? params[0] : "";
+ if (!param.empty())
+ Log(LOG_ADMIN, source, this) << "for " << param;
+ else
+ Log(LOG_ADMIN, source, this);
+
bool third = false, extra = false, vendor = false, database = false, encryption = false, pseudoclient = false, protocol = false;
if (param.equals_ci("all"))
diff --git a/modules/commands/os_reload.cpp b/modules/commands/os_reload.cpp
index d3521eef1..0722eaa21 100644
--- a/modules/commands/os_reload.cpp
+++ b/modules/commands/os_reload.cpp
@@ -23,6 +23,8 @@ class CommandOSReload : public Command
{
try
{
+ Log(LOG_ADMIN, source, this);
+
Configuration::Conf *new_config = new Configuration::Conf();
delete Config;
Config = new_config;
diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp
index 9496090db..71f6a8401 100644
--- a/modules/commands/os_session.cpp
+++ b/modules/commands/os_session.cpp
@@ -244,6 +244,8 @@ class CommandOSSession : public Command
{
const Anope::string &cmd = params[0];
+ Log(LOG_ADMIN, source, this) << cmd << " " << params[1];
+
if (!session_limit)
source.Reply(_("Session limiting is disabled."));
else if (cmd.equals_ci("LIST"))
@@ -365,6 +367,7 @@ class CommandOSException : public Command
delete exception;
else
{
+ Log(LOG_ADMIN, source, this) << "to set the session limit for " << mask << " to " << limit;
session_service->AddException(exception);
source.Reply(_("Session limit for \002%s\002 set to \002%d\002."), mask.c_str(), limit);
if (Anope::ReadOnly)
@@ -396,6 +399,7 @@ class CommandOSException : public Command
for (; i < end; ++i)
if (mask.equals_ci(session_service->GetExceptions()[i]->mask))
{
+ Log(LOG_ADMIN, source, this) << "to remove session limit exception for " << mask;
ExceptionDelCallback::DoDel(source, i);
source.Reply(_("\002%s\002 deleted from session-limit exception list."), mask.c_str());
break;
@@ -436,6 +440,7 @@ class CommandOSException : public Command
session_service->GetExceptions()[n1] = session_service->GetExceptions()[n2];
session_service->GetExceptions()[n2] = temp;
+ Log(LOG_ADMIN, source, this) << "to move exception " << session_service->GetExceptions()[n1]->mask << " from position " << n1 + 1 << " to position " << n2 + 1;
source.Reply(_("Exception for \002%s\002 (#%d) moved to position \002%d\002."), session_service->GetExceptions()[n1]->mask.c_str(), n1 + 1, n2 + 1);
if (Anope::ReadOnly)
diff --git a/modules/commands/os_shutdown.cpp b/modules/commands/os_shutdown.cpp
index f4fceada7..c559f0504 100644
--- a/modules/commands/os_shutdown.cpp
+++ b/modules/commands/os_shutdown.cpp
@@ -21,6 +21,7 @@ class CommandOSQuit : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
+ Log(LOG_ADMIN, source, this);
Anope::QuitReason = source.command + " command received from " + source.GetNick();
Anope::Quitting = true;
return;
@@ -48,6 +49,7 @@ class CommandOSRestart : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
+ Log(LOG_ADMIN, source, this);
Anope::QuitReason = source.command + " command received from " + source.GetNick();
Anope::Quitting = Anope::Restarting = true;
Anope::SaveDatabases();
@@ -73,6 +75,7 @@ class CommandOSShutdown : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
+ Log(LOG_ADMIN, source, this);
Anope::QuitReason = source.command + " command received from " + source.GetNick();
Anope::Quitting = true;
Anope::SaveDatabases();
diff --git a/modules/commands/os_stats.cpp b/modules/commands/os_stats.cpp
index 1ce27f501..82074eb8f 100644
--- a/modules/commands/os_stats.cpp
+++ b/modules/commands/os_stats.cpp
@@ -201,6 +201,8 @@ class CommandOSStats : public Command
{
Anope::string extra = !params.empty() ? params[0] : "";
+ Log(LOG_ADMIN, source, this) << extra;
+
if (extra.equals_ci("RESET"))
return this->DoStatsReset(source);
diff --git a/modules/commands/os_update.cpp b/modules/commands/os_update.cpp
index 3e411cbc8..37b7dbe73 100644
--- a/modules/commands/os_update.cpp
+++ b/modules/commands/os_update.cpp
@@ -21,6 +21,7 @@ class CommandOSUpdate : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
+ Log(LOG_ADMIN, source, this);
source.Reply(_("Updating databases."));
Anope::SaveDatabases();
return;