Files
Client/Server/ManageTool/ManageClient/ManageClientCommand.cpp
LGram16 dd97ddec92 Restructure repository to include all source folders
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>
2025-11-29 20:17:20 +09:00

63 lines
1.5 KiB
C++

#include "stdafx.h"
#include "ManageClient.h"
#include <Log/ServerLog.h>
#include <Setup/SetupClient.h>
#include <Utility/ServerAppFrameWork/ConsoleWindow/ConsoleCMDFactory.h>
#include <Network/Session/Session.h>
#include <Network/Dispatch/ManageClient/ManageClientDispatch.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()
{
ManageSetup::ClientSetup::GetInstance().Load();
GET_SINGLE_DISPATCH(lpManageClientDispatch,
CManageClientDispatch, CManageClientDispatch::GetDispatchTable());
if(0 != lpManageClientDispatch)
{
// 연결을 끊은 후 재접속을 시도한다.
lpManageClientDispatch->GetSession().Shutdown();
}
return true;
}
};
bool CManageClient::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;
}