1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 01:03:12 +02:00

Remove xlines from the IRCd aswell as from our list when the clear command is used, and fixed adding timed Zlines to inspircd

This commit is contained in:
Adam
2011-11-05 15:05:15 -04:00
parent 5f0b9338dc
commit 97b9055f92
4 changed files with 16 additions and 3 deletions
+1
View File
@@ -112,6 +112,7 @@ class CoreExport XLineManager : public Service<XLineManager>
XLine *GetEntry(unsigned index);
/** Clear the XLine vector
* Note: This does not remove the XLines from the IRCd
*/
void Clear();
+7 -1
View File
@@ -379,7 +379,13 @@ class CommandOSAKill : public Command
{
User *u = source.u;
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, akills));
akills->Clear();
for (unsigned i = akills->GetCount(); i > 0; --i)
{
XLine *x = akills->GetEntry(i - 1);
akills->DelXLine(x);
}
source.Reply(_("The AKILL list has been cleared."));
return;
+7 -1
View File
@@ -272,7 +272,13 @@ class CommandOSSXLineBase : public Command
{
User *u = source.u;
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, this->xlm()));
this->xlm()->Clear();
for (unsigned i = this->xlm()->GetCount(); i > 0; --i)
{
XLine *x = this->xlm()->GetEntry(i - 1);
this->xlm()->DelXLine(x);
}
source.Reply(_("The %s list has been cleared."), this->name.c_str());
return;
+1 -1
View File
@@ -218,7 +218,7 @@ class InspIRCdTS6Proto : public IRCDProto
time_t timeleft = x->Expires - Anope::CurTime;
if (timeleft > 172800 || !x->Expires)
timeleft = 172800;
send_cmd(Config->Numeric, "ADDLINE Z %s %s %ld %ld :%s", x->GetHost().c_str(), x->By.c_str(), static_cast<long>(Anope::CurTime), static_cast<long>(Anope::CurTime), x->Reason.c_str());
send_cmd(Config->Numeric, "ADDLINE Z %s %s %ld %ld :%s", x->GetHost().c_str(), x->By.c_str(), static_cast<long>(Anope::CurTime), static_cast<long>(timeleft), x->Reason.c_str());
}
void SendSVSJoin(const Anope::string &source, const Anope::string &nick, const Anope::string &chan, const Anope::string &)