1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:34:48 +02:00

Show akill/xline ids in view

This commit is contained in:
Adam
2016-01-22 10:29:44 -05:00
parent eac25d016a
commit f91f375b70
2 changed files with 13 additions and 2 deletions
+6 -1
View File
@@ -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);
}
+7 -1
View File
@@ -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);
}