Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
#include "stdafx.h"
|
|
#include "ManageServer.h"
|
|
#include <Log/ServerLog.h>
|
|
#include <Utility/ServerAppFrameWork/ConsoleWindow/ConsoleCMDFactory.h>
|
|
|
|
#include <ServerManage/ManageClientManager.h>
|
|
#include <UserManage/UserStatistics.h>
|
|
|
|
class CCMDPrintLog : public CConsoleCMDSingleton<CCMDPrintLog>
|
|
{
|
|
protected:
|
|
virtual bool DoProcess()
|
|
{
|
|
SERLOG0(g_Log, "Flush log.");
|
|
SERLOG0(g_SessionLog, "Flush log");
|
|
return true;
|
|
}
|
|
};
|
|
|
|
class CCMDReloadSetup : public CConsoleCMDSingleton<CCMDReloadSetup>
|
|
{
|
|
protected:
|
|
virtual bool DoProcess()
|
|
{
|
|
CManageClientManager::GetInstance().ReloadRunInfo();
|
|
CUserStatistics::GetInstance().Load();
|
|
return true;
|
|
}
|
|
};
|
|
|
|
bool CManageServer::InitializeCommand()
|
|
{
|
|
#define INIT_COMMAND_FAILED(detail) TEXT("Command create failed - "##detail)
|
|
|
|
#define ADD_COMMAND(cmdstring, cmdobject, errmsg_val) \
|
|
if(0 == (errmsg_val) && !GetCommandFactory()->AddCommand(cmdstring, new cmdobject)) { \
|
|
(errmsg_val) = INIT_COMMAND_FAILED(cmdstring); }
|
|
|
|
const TCHAR* szErrorMessage = 0;
|
|
|
|
ADD_COMMAND("flush", CCMDPrintLog, szErrorMessage);
|
|
ADD_COMMAND("reload", CCMDReloadSetup, szErrorMessage);
|
|
|
|
if(0 != szErrorMessage)
|
|
{
|
|
ERRLOG0(g_Log, szErrorMessage);
|
|
return false;
|
|
};
|
|
|
|
return true;
|
|
} |