Fix replay timer assignment to new members

Ignore expired state of replay timers when assigning to new members

This fixes a regression from a previous change that stopped assigning
expired lockouts to new members. Only expired event timers should be
ignored for new members. Replay Timers should always be added with a
a fresh lockout
This commit is contained in:
hg 2020-06-17 18:28:49 -04:00
parent 75410e8886
commit 892556e26d

View File

@ -810,7 +810,7 @@ void Expedition::DzInviteResponse(Client* add_client, bool accepted, const std::
for (const auto& lockout_iter : m_lockouts)
{
const ExpeditionLockoutTimer& lockout = lockout_iter.second;
if (!lockout.IsInherited() && !lockout.IsExpired() &&
if (!lockout.IsInherited() &&
!add_client->HasExpeditionLockout(m_expedition_name, lockout.GetEventName()))
{
// replay timers are optionally added to new members immediately on
@ -823,7 +823,7 @@ void Expedition::DzInviteResponse(Client* add_client, bool accepted, const std::
lockout.GetExpeditionName(), lockout.GetEventName(), lockout.GetDuration());
}
}
else
else if (!lockout.IsExpired())
{
pending_lockouts.emplace_back(lockout);
}