feat(Core/Warden): optimization + PQR detection (#3875)

* Update AuctionHouseHandler.cpp

* feat(warden): block PQR

* wip

* Update Warden.cpp

* Core/Warden: minor preperation

* Core/Misc: implemented some needed container wrapper functions

* Core/Warden: more preperations

* Core/Warden: more rework
* LUA checks now are splitted to seperate config
* LUA checks are always in front of queue
* Fixed "Other" checks
* Fixed PQR detection

* Core/Warden: adjusted and optimized

* Core/Warden: optimization

* Core/Warden: more optimization

* Core/Warden: use warden comments in ban reason

* Core/Warden: more warden work

* Core/Warden: more optimizations

* Core/Warden: more refactors

* Core/Warden: some more refactors + use default SHA definitions

* Core/Warden: more refactoring

* Core/Warden: fixed PQR detection again

* Core/Warden: improved detection logging

* Core/Misc: removed SmartEnums - we do not need it here + maybe should go as seperate commit

* Core/Warden: fixed some warnings

* Core/Warden: codestyle

* Core/Warden: include warden check comment to console logs

* Core/Warden: minor adjustment for previous commit

* Core/Warden: fixed static analysis warning

* Core/Warden: compilers, you're drunk this time... function is not unused...

* Core/Warden: minor correction for logs

* Core/Warden: one more improvement for logs

* Core/Warden: added missing overrides

* Core/Warden: some codestyle

* Core/Misc: more codestyle

* Core/Misc: more codestyle!

* Core/Warden: restored default config options... (if you change it, change in core source too)

* Core/Warden: addition to previous commit

* DB/Warden: added EWT and WOWPlus checks (provided by lineagedr)

* DB/Warden: addition to previous commit

* fix: codestyle

* Core/Warden: fixed build when extra logs are enabled in cmake

Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
Andrius Peleckas
2021-01-17 19:36:35 +02:00
committed by GitHub
parent 17f2fdb537
commit 2794842553
15 changed files with 639 additions and 417 deletions

View File

@@ -340,6 +340,7 @@ enum WorldIntConfigs
CONFIG_WARDEN_CLIENT_FAIL_ACTION,
CONFIG_WARDEN_CLIENT_BAN_DURATION,
CONFIG_WARDEN_NUM_MEM_CHECKS,
CONFIG_WARDEN_NUM_LUA_CHECKS,
CONFIG_WARDEN_NUM_OTHER_CHECKS,
CONFIG_BIRTHDAY_TIME,
CONFIG_SOCKET_TIMEOUTTIME_ACTIVE,

View File

@@ -1315,6 +1315,7 @@ void World::LoadConfigSettings(bool reload)
// Warden
m_bool_configs[CONFIG_WARDEN_ENABLED] = sConfigMgr->GetBoolDefault("Warden.Enabled", false);
m_int_configs[CONFIG_WARDEN_NUM_MEM_CHECKS] = sConfigMgr->GetIntDefault("Warden.NumMemChecks", 3);
m_int_configs[CONFIG_WARDEN_NUM_LUA_CHECKS] = sConfigMgr->GetIntDefault("Warden.NumLuaChecks", 1);
m_int_configs[CONFIG_WARDEN_NUM_OTHER_CHECKS] = sConfigMgr->GetIntDefault("Warden.NumOtherChecks", 7);
m_int_configs[CONFIG_WARDEN_CLIENT_BAN_DURATION] = sConfigMgr->GetIntDefault("Warden.BanDuration", 86400);
m_int_configs[CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF] = sConfigMgr->GetIntDefault("Warden.ClientCheckHoldOff", 30);