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

Update last_modes when keepmodes is set on or off

This commit is contained in:
Adam
2013-12-17 11:02:06 -05:00
parent 1ab7d53649
commit e6544a06f4
+4 -1
View File
@@ -364,15 +364,18 @@ class CommandCSSetKeepModes : public Command
Log(source.AccessFor(ci).HasPriv("SET") ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to enable keep modes";
ci->Extend<bool>("CS_KEEP_MODES");
source.Reply(_("Keep modes for %s is now \002on\002."), ci->name.c_str());
if (ci->c)
ci->last_modes = ci->c->GetModes();
}
else if (params[1].equals_ci("OFF"))
{
Log(source.AccessFor(ci).HasPriv("SET") ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to disable keep modes";
ci->Shrink<bool>("CS_KEEP_MODES");
source.Reply(_("Keep modes for %s is now \002off\002."), ci->name.c_str());
ci->last_modes.clear();
}
else
this->OnSyntaxError(source, "PEACE");
this->OnSyntaxError(source, "KEEPMODES");
}
bool OnHelp(CommandSource &source, const Anope::string &) anope_override