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>
This commit is contained in:
63
Server/ManageTool/ManageClient/ManageClientCommand.cpp
Normal file
63
Server/ManageTool/ManageClient/ManageClientCommand.cpp
Normal file
@@ -0,0 +1,63 @@
|
||||
#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)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>õ<EFBFBD><C3B5>Ѵ<EFBFBD>.
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user