summaryrefslogtreecommitdiff
path: root/modules/commands/os_sxline.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-01-22 10:29:44 -0500
committerAdam <Adam@anope.org>2016-01-22 10:29:44 -0500
commitf91f375b70a4932f8c7ef400cd8f6da32309d318 (patch)
tree50719cd8b2e3b2ec88a1a1207a2e4580b61561b7 /modules/commands/os_sxline.cpp
parenteac25d016ac542a4f0e380c8a8c0cb65515fd6db (diff)
Show akill/xline ids in view
Diffstat (limited to 'modules/commands/os_sxline.cpp')
-rw-r--r--modules/commands/os_sxline.cpp8
1 files changed, 7 insertions, 1 deletions
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> &params)
{
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);
}