diff options
author | Adam <Adam@anope.org> | 2016-10-01 10:48:37 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-10-01 10:48:37 -0400 |
commit | b9436b12991c7a74fa539f8abee4af6d5a65dbba (patch) | |
tree | fa330de890a33e83a64597ae23ef8610b34bbe07 | |
parent | 0110013f2cb66c57705d2d0f1f53c4d06924106d (diff) |
Show akill/xline ids in view
-rw-r--r-- | modules/operserv/akill.cpp | 7 | ||||
-rw-r--r-- | modules/operserv/sxline.cpp | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/modules/operserv/akill.cpp b/modules/operserv/akill.cpp index 9a6a7b271..36d555b79 100644 --- a/modules/operserv/akill.cpp +++ b/modules/operserv/akill.cpp @@ -258,6 +258,7 @@ class CommandOSAKill : public Command entry["Creator"] = x->GetBy(); entry["Created"] = Anope::strftime(x->GetCreated(), NULL, true); entry["Expires"] = Anope::Expires(x->GetExpires(), source.nc); + entry["ID"] = x->GetID(); entry["Reason"] = x->GetReason(); list.AddEntry(entry); }, @@ -276,6 +277,7 @@ class CommandOSAKill : public Command entry["Creator"] = x->GetBy(); entry["Created"] = Anope::strftime(x->GetCreated(), NULL, true); entry["Expires"] = Anope::Expires(x->GetExpires(), source.nc); + entry["ID"] = x->GetID(); entry["Reason"] = x->GetReason(); list.AddEntry(entry); } @@ -322,7 +324,10 @@ class CommandOSAKill : public Command } ListFormatter list(source.GetAccount()); - list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Creator")).AddColumn(_("Created")).AddColumn(_("Expires")).AddColumn(_("Reason")); + list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Creator")).AddColumn(_("Created")).AddColumn(_("Expires")); + if (Config->GetModule("operserv")->Get<bool>("akillids")) + list.AddColumn(_("ID")); + list.AddColumn(_("Reason")); this->ProcessList(source, params, list); } diff --git a/modules/operserv/sxline.cpp b/modules/operserv/sxline.cpp index 581599229..748418790 100644 --- a/modules/operserv/sxline.cpp +++ b/modules/operserv/sxline.cpp @@ -116,6 +116,7 @@ class CommandOSSXLineBase : public Command entry["By"] = x->GetBy(); entry["Created"] = Anope::strftime(x->GetCreated(), NULL, true); entry["Expires"] = Anope::Expires(x->GetExpires(), source.nc); + entry["ID"] = x->GetID(); entry["Reason"] = x->GetReason(); list.AddEntry(entry); }, @@ -134,6 +135,7 @@ class CommandOSSXLineBase : public Command entry["By"] = x->GetBy(); entry["Created"] = Anope::strftime(x->GetCreated(), NULL, true); entry["Expires"] = Anope::Expires(x->GetExpires(), source.nc); + entry["ID"] = x->GetID(); entry["Reason"] = x->GetReason(); list.AddEntry(entry); } @@ -165,7 +167,11 @@ class CommandOSSXLineBase : public Command void OnView(CommandSource &source, const std::vector<Anope::string> ¶ms) { ListFormatter list(source.GetAccount()); - list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Created")).AddColumn(_("Expires")).AddColumn(_("Reason")); + list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Created")).AddColumn(_("Expires")); + if (Config->GetModule("operserv")->Get<bool>("akillids")) + list.AddColumn(_("ID")); + list.AddColumn(_("Reason")); + this->ProcessList(source, params, list); } |