mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9050] Add MAX_EXPANSION define for config option Expansion check.
This will prevent case when expansion set to high for supported client in config and account have also too high expansion setting. Client in like case receive too high expnasion and reject connection because it think that have not installed expansion for connection account. This possible for example for account case when single realmd used for diff client versions and account have high expansion setting for most recent client support. And in same time mamngos.conf for specific realm have wrong Expansion value.
This commit is contained in:
parent
5e081196b1
commit
fb21f4c16e
3 changed files with 16 additions and 3 deletions
|
|
@ -897,12 +897,18 @@ void World::LoadConfigSettings(bool reload)
|
|||
|
||||
if(reload)
|
||||
{
|
||||
uint32 val = sConfig.GetIntDefault("Expansion",1);
|
||||
uint32 val = sConfig.GetIntDefault("Expansion",MAX_EXPANSION);
|
||||
if(val!=m_configs[CONFIG_EXPANSION])
|
||||
sLog.outError("Expansion option can't be changed at mangosd.conf reload, using current value (%u).",m_configs[CONFIG_EXPANSION]);
|
||||
}
|
||||
else
|
||||
m_configs[CONFIG_EXPANSION] = sConfig.GetIntDefault("Expansion",1);
|
||||
m_configs[CONFIG_EXPANSION] = sConfig.GetIntDefault("Expansion",MAX_EXPANSION);
|
||||
|
||||
if(m_configs[CONFIG_EXPANSION] > MAX_EXPANSION)
|
||||
{
|
||||
sLog.outError("Expansion option can't be greater %u but set to %u, used %u",MAX_EXPANSION,m_configs[CONFIG_EXPANSION],MAX_EXPANSION);
|
||||
m_configs[CONFIG_EXPANSION] = MAX_EXPANSION;
|
||||
}
|
||||
|
||||
m_configs[CONFIG_CHATFLOOD_MESSAGE_COUNT] = sConfig.GetIntDefault("ChatFlood.MessageCount",10);
|
||||
m_configs[CONFIG_CHATFLOOD_MESSAGE_DELAY] = sConfig.GetIntDefault("ChatFlood.MessageDelay",1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue