1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Set kick/ban header to the default identifier if one was not specified.

This commit is contained in:
Sandu Liviu Catalin 2016-10-25 16:08:23 +03:00
parent 0df1582ac6
commit adbacfca11

View File

@ -271,7 +271,7 @@ void CPlayer::Kick() const
// Validate the managed identifier // Validate the managed identifier
Validate(); Validate();
// Store the default header and payload // Store the default header and payload
Core::Get().GetPlayer(m_ID).mKickBanHeader = 0; Core::Get().GetPlayer(m_ID).mKickBanHeader = vcmpDisconnectReasonKick;
Core::Get().GetPlayer(m_ID).mKickBanPayload = NullObject(); Core::Get().GetPlayer(m_ID).mKickBanPayload = NullObject();
// Perform the requested operation // Perform the requested operation
_Func->KickPlayer(m_ID); _Func->KickPlayer(m_ID);
@ -295,7 +295,7 @@ void CPlayer::Ban() const
// Validate the managed identifier // Validate the managed identifier
Validate(); Validate();
// Store the default header and payload // Store the default header and payload
Core::Get().GetPlayer(m_ID).mKickBanHeader = 0; Core::Get().GetPlayer(m_ID).mKickBanHeader = vcmpDisconnectReasonKick;
Core::Get().GetPlayer(m_ID).mKickBanPayload = NullObject(); Core::Get().GetPlayer(m_ID).mKickBanPayload = NullObject();
// Perform the requested operation // Perform the requested operation
_Func->BanPlayer(m_ID); _Func->BanPlayer(m_ID);