mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
feat(Core/Config): rework config and delete ACE inherited (#4608)
This commit is contained in:
@@ -30,13 +30,13 @@ PacketLog* PacketLog::instance()
|
||||
|
||||
void PacketLog::Initialize()
|
||||
{
|
||||
std::string logsDir = sConfigMgr->GetStringDefault("LogsDir", "");
|
||||
std::string logsDir = sConfigMgr->GetOption<std::string>("LogsDir", "");
|
||||
|
||||
if (!logsDir.empty())
|
||||
if ((logsDir.at(logsDir.length() - 1) != '/') && (logsDir.at(logsDir.length() - 1) != '\\'))
|
||||
logsDir.push_back('/');
|
||||
|
||||
std::string logname = sConfigMgr->GetStringDefault("PacketLogFile", "");
|
||||
std::string logname = sConfigMgr->GetOption<std::string>("PacketLogFile", "");
|
||||
if (!logname.empty())
|
||||
_file = fopen((logsDir + logname).c_str(), "wb");
|
||||
}
|
||||
|
||||
@@ -222,9 +222,9 @@ WorldSocketMgr* WorldSocketMgr::instance()
|
||||
int
|
||||
WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
{
|
||||
m_UseNoDelay = sConfigMgr->GetBoolDefault ("Network.TcpNodelay", true);
|
||||
m_UseNoDelay = sConfigMgr->GetOption<bool> ("Network.TcpNodelay", true);
|
||||
|
||||
int num_threads = sConfigMgr->GetIntDefault ("Network.Threads", 1);
|
||||
int num_threads = sConfigMgr->GetOption<int32> ("Network.Threads", 1);
|
||||
|
||||
if (num_threads <= 0)
|
||||
{
|
||||
@@ -239,9 +239,9 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
sLog->outBasic ("Max allowed socket connections %d", ACE::max_handles());
|
||||
|
||||
// -1 means use default
|
||||
m_SockOutKBuff = sConfigMgr->GetIntDefault ("Network.OutKBuff", -1);
|
||||
m_SockOutKBuff = sConfigMgr->GetOption<int32> ("Network.OutKBuff", -1);
|
||||
|
||||
m_SockOutUBuff = sConfigMgr->GetIntDefault ("Network.OutUBuff", 65536);
|
||||
m_SockOutUBuff = sConfigMgr->GetOption<int32> ("Network.OutUBuff", 65536);
|
||||
|
||||
if (m_SockOutUBuff <= 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user