mirror of
https://github.com/anope/anope.git
synced 2026-07-06 21:43:13 +02:00
Made the mode bouncing detector harder to hit and ignore syncing channels
This commit is contained in:
+23
-8
@@ -125,13 +125,6 @@ void Channel::CheckModes()
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->chanserv_modetime != Anope::CurTime)
|
||||
{
|
||||
this->chanserv_modecount = 0;
|
||||
this->chanserv_modetime = Anope::CurTime;
|
||||
}
|
||||
this->chanserv_modecount++;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(I_OnCheckModes, OnCheckModes(this));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
@@ -484,6 +477,17 @@ void Channel::SetMode(BotInfo *bi, ChannelMode *cm, const Anope::string ¶m,
|
||||
return;
|
||||
}
|
||||
|
||||
if (Me->IsSynced())
|
||||
{
|
||||
if (this->chanserv_modetime != Anope::CurTime)
|
||||
{
|
||||
this->chanserv_modecount = 0;
|
||||
this->chanserv_modetime = Anope::CurTime;
|
||||
}
|
||||
|
||||
this->chanserv_modecount++;
|
||||
}
|
||||
|
||||
ModeManager::StackerAdd(bi, this, cm, true, param);
|
||||
MessageSource ms(bi);
|
||||
SetModeInternal(ms, cm, param, enforce_mlock);
|
||||
@@ -524,6 +528,17 @@ void Channel::RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string ¶
|
||||
this->GetParam(cmp->name, realparam);
|
||||
}
|
||||
|
||||
if (Me->IsSynced())
|
||||
{
|
||||
if (this->chanserv_modetime != Anope::CurTime)
|
||||
{
|
||||
this->chanserv_modecount = 0;
|
||||
this->chanserv_modetime = Anope::CurTime;
|
||||
}
|
||||
|
||||
this->chanserv_modecount++;
|
||||
}
|
||||
|
||||
ModeManager::StackerAdd(bi, this, cm, false, realparam);
|
||||
MessageSource ms(bi);
|
||||
RemoveModeInternal(ms, cm, realparam, enforce_mlock);
|
||||
@@ -616,7 +631,7 @@ void Channel::SetModes(BotInfo *bi, bool enforce_mlock, const char *cmodes, ...)
|
||||
|
||||
void Channel::SetModesInternal(MessageSource &source, const Anope::string &mode, time_t ts, bool enforce_mlock)
|
||||
{
|
||||
if (source.GetServer())
|
||||
if (source.GetServer() && source.GetServer()->IsSynced())
|
||||
{
|
||||
if (Anope::CurTime != this->server_modetime)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user