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

Fix akillids to work again. os_session: Add missing num to del syntax and add missing expiry column.

This commit is contained in:
Robby-
2013-09-23 19:14:20 +02:00
committed by Adam
parent bf67b9ee5c
commit 06c5914820
3 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ class CommandOSAKill : public Command
reason = "[" + source.GetNick() + "] " + reason;
XLine *x = new XLine(mask, source.GetNick(), expires, reason);
if (Config->GetBlock("operserv")->Get<bool>("akilids"))
if (Config->GetModule("operserv")->Get<bool>("akillids"))
x->id = XLineManager::GenerateUID();
unsigned int affected = 0;
+8 -3
View File
@@ -484,7 +484,8 @@ class CommandOSException : public Command
entry["Number"] = stringify(Number);
entry["Mask"] = e->mask;
entry["By"] = e->who;
entry["Created"] = Anope::strftime(e->time, source.GetAccount());
entry["Created"] = Anope::strftime(e->time, NULL, true);
entry["Expires"] = Anope::Expires(e->expires, source.GetAccount());
entry["Limit"] = stringify(e->limit);
entry["Reason"] = e->reason;
this->list.AddEntry(entry);
@@ -504,7 +505,8 @@ class CommandOSException : public Command
entry["Number"] = stringify(i + 1);
entry["Mask"] = e->mask;
entry["By"] = e->who;
entry["Created"] = Anope::strftime(e->time, source.GetAccount());
entry["Created"] = Anope::strftime(e->time, NULL, true);
entry["Expires"] = Anope::Expires(e->expires, source.GetAccount());
entry["Limit"] = stringify(e->limit);
entry["Reason"] = e->reason;
list.AddEntry(entry);
@@ -537,7 +539,7 @@ class CommandOSException : public Command
void DoView(CommandSource &source, const std::vector<Anope::string> &params)
{
ListFormatter list(source.GetAccount());
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Created")).AddColumn(_("Limit")).AddColumn(_("Reason"));
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Created")).AddColumn(_("Expires")).AddColumn(_("Limit")).AddColumn(_("Reason"));
this->ProcessList(source, params, list);
}
@@ -595,9 +597,12 @@ class CommandOSException : public Command
"may carry at a time. A value of zero means the host has an\n"
"unlimited session limit. See the \002AKILL\002 help for details about\n"
"the format of the optional \037expiry\037 parameter.\n"
" \n"
"\002EXCEPTION DEL\002 removes the given mask from the exception list.\n"
" \n"
"\002EXCEPTION MOVE\002 moves exception \037num\037 to \037position\037. The\n"
"sessions inbetween will be shifted up or down to fill the gap.\n"
" \n"
"\002EXCEPTION LIST\002 and \002EXCEPTION VIEW\002 show all current\n"
"sessions if the optional mask is given, the list is limited\n"
"to those sessions matching the mask. The difference is that\n"
+2 -2
View File
@@ -356,7 +356,7 @@ class CommandOSSNLine : public CommandOSSXLineBase
reason = "[" + source.GetNick() + "] " + reason;
XLine *x = new XLine(mask, source.GetNick(), expires, reason);
if (Config->GetBlock("operserv")->Get<bool>("akilids"))
if (Config->GetModule("operserv")->Get<bool>("akillids"))
x->id = XLineManager::GenerateUID();
unsigned int affected = 0;
@@ -562,7 +562,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
reason = "[" + source.GetNick() + "] " + reason;
XLine *x = new XLine(mask, source.GetNick(), expires, reason);
if (Config->GetBlock("operserv")->Get<bool>("akilids"))
if (Config->GetModule("operserv")->Get<bool>("akillids"))
x->id = XLineManager::GenerateUID();
unsigned int affected = 0;