Update some of warden.
This commit is contained in:
@@ -896,8 +896,9 @@ namespace Game
|
||||
|
||||
// Warden
|
||||
Values[WorldCfg.WardenEnabled] = GetDefaultValue("Warden.Enabled", false);
|
||||
Values[WorldCfg.WardenNumMemChecks] = GetDefaultValue("Warden.NumMemChecks", 3);
|
||||
Values[WorldCfg.WardenNumOtherChecks] = GetDefaultValue("Warden.NumOtherChecks", 7);
|
||||
Values[WorldCfg.WardenNumInjectChecks] = GetDefaultValue("Warden.NumInjectionChecks", 9);
|
||||
Values[WorldCfg.WardenNumLuaChecks] = GetDefaultValue("Warden.NumLuaSandboxChecks", 1);
|
||||
Values[WorldCfg.WardenNumClientModChecks] = GetDefaultValue("Warden.NumClientModChecks", 1);
|
||||
Values[WorldCfg.WardenClientBanDuration] = GetDefaultValue("Warden.BanDuration", 86400);
|
||||
Values[WorldCfg.WardenClientCheckHoldoff] = GetDefaultValue("Warden.ClientCheckHoldOff", 30);
|
||||
Values[WorldCfg.WardenClientFailAction] = GetDefaultValue("Warden.ClientCheckFailAction", 0);
|
||||
|
||||
@@ -344,19 +344,19 @@ namespace Game
|
||||
if (updater.ProcessUnsafe())
|
||||
{
|
||||
if (m_Socket[(int)ConnectionType.Realm] != null && m_Socket[(int)ConnectionType.Realm].IsOpen() && _warden != null)
|
||||
_warden.Update();
|
||||
_warden.Update(diff);
|
||||
|
||||
// If necessary, log the player out
|
||||
if (ShouldLogOut(currentTime) && m_playerLoading.IsEmpty())
|
||||
LogoutPlayer(true);
|
||||
|
||||
if (m_Socket[(int)ConnectionType.Realm] != null && GetPlayer() && _warden != null)
|
||||
_warden.Update();
|
||||
|
||||
//- Cleanup socket if need
|
||||
if ((m_Socket[(int)ConnectionType.Realm] != null && !m_Socket[(int)ConnectionType.Realm].IsOpen()) ||
|
||||
(m_Socket[(int)ConnectionType.Instance] != null && !m_Socket[(int)ConnectionType.Instance].IsOpen()))
|
||||
{
|
||||
if (GetPlayer() != null && _warden != null)
|
||||
_warden.Update(diff);
|
||||
|
||||
expireTime -= expireTime > diff ? diff : expireTime;
|
||||
if (expireTime < diff || forceExit || !GetPlayer())
|
||||
{
|
||||
@@ -656,6 +656,14 @@ namespace Game
|
||||
return ss.ToString();
|
||||
}
|
||||
|
||||
void HandleWardenData(WardenData packet)
|
||||
{
|
||||
if (_warden == null || packet.Data.GetSize() == 0)
|
||||
return;
|
||||
|
||||
_warden.HandleData(packet.Data);
|
||||
}
|
||||
|
||||
public bool PlayerLoading() { return !m_playerLoading.IsEmpty(); }
|
||||
public bool PlayerLogout() { return m_playerLogout; }
|
||||
public bool PlayerLogoutWithSave() { return m_playerLogout && m_playerSave; }
|
||||
|
||||
Reference in New Issue
Block a user