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

#1649 don't update keepmodes during inhbait

This commit is contained in:
Adam
2015-06-29 19:35:57 -04:00
parent 074f163750
commit 02ed9a9725
2 changed files with 9 additions and 5 deletions
+7 -3
View File
@@ -1207,6 +1207,8 @@ class CSSet : public Module
CommandCSSetSuccessor commandcssetsuccessor;
CommandCSSetNoexpire commandcssetnoexpire;
ExtensibleRef<bool> inhabit;
bool persist_lower_ts;
public:
@@ -1221,7 +1223,9 @@ class CSSet : public Module
commandcssetdescription(this), commandcssetfounder(this), commandcssetkeepmodes(this),
commandcssetpeace(this), commandcssetpersist(this), commandcssetrestricted(this),
commandcssetsecure(this), commandcssetsecurefounder(this), commandcssetsecureops(this), commandcssetsignkick(this),
commandcssetsuccessor(this), commandcssetnoexpire(this)
commandcssetsuccessor(this), commandcssetnoexpire(this),
inhabit("inhabit")
{
}
@@ -1271,7 +1275,7 @@ class CSSet : public Module
if (mode->name == "PERM")
persist.Set(c->ci, true);
if (mode->type != MODE_STATUS && !c->syncing && Me->IsSynced())
if (mode->type != MODE_STATUS && !c->syncing && Me->IsSynced() && (!inhabit || !inhabit->HasExt(c)))
c->ci->last_modes = c->GetModes();
}
@@ -1286,7 +1290,7 @@ class CSSet : public Module
persist.Unset(c->ci);
}
if (c->ci && mode->type != MODE_STATUS && !c->syncing && Me->IsSynced())
if (c->ci && mode->type != MODE_STATUS && !c->syncing && Me->IsSynced() && (!inhabit || !inhabit->HasExt(c)))
c->ci->last_modes = c->GetModes();
return EVENT_CONTINUE;
+2 -2
View File
@@ -66,12 +66,12 @@ class ChanServCore : public Module, public ChanServService
if (!c)
return;
inhabit.Unset(c);
/* In the event we don't part */
c->RemoveMode(NULL, "SECRET");
c->RemoveMode(NULL, "INVITE");
inhabit.Unset(c); /* now we're done changing modes, unset inhabit */
if (!c->ci || !c->ci->bi)
{
if (ChanServ)