diff options
author | Adam <Adam@anope.org> | 2017-02-06 14:23:18 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-02-06 14:23:18 -0500 |
commit | 8b694bc392c36551e428b84454efb81cdbc8bcd3 (patch) | |
tree | ca3d1ca8aadac280c149518134de4208f91dad84 /modules/chanserv/log.cpp | |
parent | 9ad06f49bbb3824139b0c0ee0a74898a18c8f735 (diff) |
Track override in CommandSource and use it in the logger
Diffstat (limited to 'modules/chanserv/log.cpp')
-rw-r--r-- | modules/chanserv/log.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/chanserv/log.cpp b/modules/chanserv/log.cpp index 7e7fb084a..1f67f4029 100644 --- a/modules/chanserv/log.cpp +++ b/modules/chanserv/log.cpp @@ -178,7 +178,7 @@ public: return; } - if (!source.AccessFor(ci).HasPriv("SET") && !source.HasPriv("chanserv/administration")) + if (!source.AccessFor(ci).HasPriv("SET") && !source.HasOverridePriv("chanserv/administration")) { source.Reply(_("Access denied. You do not have privilege \002{0}\002 on \002{1}\002."), "SET", ci->GetName()); return; @@ -285,7 +285,7 @@ public: { if (log->GetExtra() == extra) { - logger.Command(override ? LogType::OVERRIDE : LogType::COMMAND, source, ci, _("{source} used {command} on {channel} to remove logging for {0} with method {1}"), + logger.Command(source, ci, _("{source} used {command} on {channel} to remove logging for {0} with method {1}"), command, method + (extra.empty() ? "" : (" " + extra))); source.Reply(_("Logging for command \002{0}\002 on \002{1}\002 with log method \002{2}{3}{4}\002 has been removed."), @@ -297,7 +297,7 @@ public: { log->SetExtra(extra); - logger.Command(override ? LogType::OVERRIDE : LogType::COMMAND, source, ci, _("{source} used {command} on {channel} to change logging for {0} to method {1}"), + logger.Command(source, ci, _("{source} used {command} on {channel} to change logging for {0} to method {1}"), command, method + (extra.empty() ? "" : (" " + extra))); source.Reply(_("Logging changed for command \002{0}\002 on \002{1}\002, now using log method \002{2}{3}{4]\002."), @@ -319,7 +319,7 @@ public: log->SetCreated(Anope::CurTime); log->SetCreator(source.GetNick()); - logger.Command(override ? LogType::OVERRIDE : LogType::COMMAND, source, ci, + logger.Command(source, ci, _("{source} used {command} on {channel} to log {0} to method {1}"), command, method + (extra.empty() ? "" : (" " + extra))); source.Reply(_("Logging is now active for command \002{0}\002 on \002{1}\002, using log method \002{2}{3}{4}\002."), |