mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
* Fixed tolerant login queue. Thanks to Iskander.
--HG-- branch : trunk
This commit is contained in:
@@ -285,12 +285,13 @@ bool World::HasRecentlyDisconnected(WorldSession* session)
|
||||
|
||||
if(uint32 tolerance = getConfig(CONFIG_INTERVAL_DISCONNECT_TOLERANCE))
|
||||
{
|
||||
for(DisconnectMap::iterator i = m_disconnects.begin(); i != m_disconnects.end(); ++i)
|
||||
for(DisconnectMap::iterator i = m_disconnects.begin(); i != m_disconnects.end(); )
|
||||
{
|
||||
if(difftime(i->second, time(NULL)) < tolerance)
|
||||
{
|
||||
if(i->first == session->GetAccountId())
|
||||
return true;
|
||||
++i;
|
||||
}
|
||||
else
|
||||
m_disconnects.erase(i);
|
||||
|
||||
Reference in New Issue
Block a user