summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-01 10:48:37 -0400
committerAdam <Adam@anope.org>2016-10-01 10:48:37 -0400
commitb9436b12991c7a74fa539f8abee4af6d5a65dbba (patch)
treefa330de890a33e83a64597ae23ef8610b34bbe07
parent0110013f2cb66c57705d2d0f1f53c4d06924106d (diff)
Show akill/xline ids in view
-rw-r--r--modules/operserv/akill.cpp7
-rw-r--r--modules/operserv/sxline.cpp8
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> &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);
}