refactor(Core/Server): Improvements to antidos opcode handling (#21502)
This commit is contained in:
@@ -366,7 +366,6 @@ enum WorldIntConfigs
|
||||
CONFIG_WINTERGRASP_BATTLETIME,
|
||||
CONFIG_WINTERGRASP_NOBATTLETIME,
|
||||
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH,
|
||||
CONFIG_PACKET_SPOOF_POLICY,
|
||||
CONFIG_PACKET_SPOOF_BANMODE,
|
||||
CONFIG_PACKET_SPOOF_BANDURATION,
|
||||
CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
#include "WaypointMovementGenerator.h"
|
||||
#include "WeatherMgr.h"
|
||||
#include "WhoListCacheMgr.h"
|
||||
#include "WorldGlobals.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldSessionMgr.h"
|
||||
@@ -1196,7 +1197,6 @@ void World::LoadConfigSettings(bool reload)
|
||||
_bool_configs[CONFIG_SET_ALL_CREATURES_WITH_WAYPOINT_MOVEMENT_ACTIVE] = sConfigMgr->GetOption<bool>("SetAllCreaturesWithWaypointMovementActive", false);
|
||||
|
||||
// packet spoof punishment
|
||||
_int_configs[CONFIG_PACKET_SPOOF_POLICY] = sConfigMgr->GetOption<int32>("PacketSpoof.Policy", (uint32)WorldSession::DosProtection::POLICY_KICK);
|
||||
_int_configs[CONFIG_PACKET_SPOOF_BANMODE] = sConfigMgr->GetOption<int32>("PacketSpoof.BanMode", (uint32)0);
|
||||
if (_int_configs[CONFIG_PACKET_SPOOF_BANMODE] > 1)
|
||||
_int_configs[CONFIG_PACKET_SPOOF_BANMODE] = (uint32)0;
|
||||
@@ -1952,6 +1952,9 @@ void World::SetInitialWorldSettings()
|
||||
LOG_INFO("server.loading", "Load Channels...");
|
||||
ChannelMgr::LoadChannels();
|
||||
|
||||
LOG_INFO("server.loading", "Loading AntiDos opcode policies");
|
||||
sWorldGlobals->LoadAntiDosOpcodePolicies();
|
||||
|
||||
sScriptMgr->OnBeforeWorldInitialized();
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS))
|
||||
|
||||
Reference in New Issue
Block a user