Disconnection message no longer shown if ping
parent
b4ac4a14fa
commit
2dd823da09
|
@ -2290,6 +2290,8 @@ void cClientHandle::SocketClosed(void)
|
||||||
|
|
||||||
LOGD("Player %s @ %s disconnected", m_Username.c_str(), m_IPString.c_str());
|
LOGD("Player %s @ %s disconnected", m_Username.c_str(), m_IPString.c_str());
|
||||||
|
|
||||||
|
if (m_Username != "") // Ignore client pings
|
||||||
|
{
|
||||||
if (!cRoot::Get()->GetPluginManager()->CallHookDisconnect(m_Player, "Player disconnected"))
|
if (!cRoot::Get()->GetPluginManager()->CallHookDisconnect(m_Player, "Player disconnected"))
|
||||||
{
|
{
|
||||||
AString DisconnectMessage;
|
AString DisconnectMessage;
|
||||||
|
@ -2297,6 +2299,7 @@ void cClientHandle::SocketClosed(void)
|
||||||
cRoot::Get()->BroadcastChat(DisconnectMessage);
|
cRoot::Get()->BroadcastChat(DisconnectMessage);
|
||||||
LOGINFO("Player %s has left the game.", m_Username.c_str());
|
LOGINFO("Player %s has left the game.", m_Username.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue