diff options
author | Adam <Adam@anope.org> | 2016-01-22 10:29:44 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-01-22 10:29:44 -0500 |
commit | f91f375b70a4932f8c7ef400cd8f6da32309d318 (patch) | |
tree | 50719cd8b2e3b2ec88a1a1207a2e4580b61561b7 | |
parent | eac25d016ac542a4f0e380c8a8c0cb65515fd6db (diff) |
Show akill/xline ids in view
-rw-r--r-- | modules/commands/os_akill.cpp | 7 | ||||
-rw-r--r-- | modules/commands/os_sxline.cpp | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index 81c440ef3..154390135 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -287,6 +287,7 @@ class CommandOSAKill : public Command entry["Creator"] = x->by; entry["Created"] = Anope::strftime(x->created, NULL, true); entry["Expires"] = Anope::Expires(x->expires, source.nc); + entry["ID"] = x->id; entry["Reason"] = x->reason; this->list.AddEntry(entry); } @@ -308,6 +309,7 @@ class CommandOSAKill : public Command entry["Creator"] = x->by; entry["Created"] = Anope::strftime(x->created, NULL, true); entry["Expires"] = Anope::Expires(x->expires, source.nc); + entry["ID"] = x->id; entry["Reason"] = x->reason; list.AddEntry(entry); } @@ -353,7 +355,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/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp index eb3d570ec..eadb276b4 100644 --- a/modules/commands/os_sxline.cpp +++ b/modules/commands/os_sxline.cpp @@ -144,6 +144,7 @@ class CommandOSSXLineBase : public Command entry["By"] = x->by; entry["Created"] = Anope::strftime(x->created, NULL, true); entry["Expires"] = Anope::Expires(x->expires, source.nc); + entry["ID"] = x->id; entry["Reason"] = x->reason; list.AddEntry(entry); } @@ -165,6 +166,7 @@ class CommandOSSXLineBase : public Command entry["By"] = x->by; entry["Created"] = Anope::strftime(x->created, NULL, true); entry["Expires"] = Anope::Expires(x->expires, source.nc); + entry["ID"] = x->id; entry["Reason"] = x->reason; list.AddEntry(entry); } @@ -196,7 +198,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); } |