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:
113
Server/AdminTool/AdminToolServer/Ryl_AdminServerCommand.h
Normal file
113
Server/AdminTool/AdminToolServer/Ryl_AdminServerCommand.h
Normal file
@@ -0,0 +1,113 @@
|
||||
|
||||
#include <RYL_AdminManagerServer.h>
|
||||
#include <Parser/ServerInfo.h>
|
||||
#include <Utility/ServerAppFrameWork/ConsoleWindow/ConsoleCMDFactory.h>
|
||||
#include <Log/ServerLog.h>
|
||||
|
||||
#include "RYL_AgentServerTable.h"
|
||||
|
||||
// <20>α<EFBFBD> <20><><EFBFBD><EFBFBD> "flush"
|
||||
class CCMDFlush : public CConsoleCMDSingleton<CCMDFlush>
|
||||
{
|
||||
protected:
|
||||
virtual bool DoProcess()
|
||||
{
|
||||
SERLOG0(g_Log, "Execute console command: flush");
|
||||
|
||||
g_Log.Flush();
|
||||
|
||||
CRylAdminManagerServer::GetInstance().PrintOutput("Log flush complete", 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// <20><>ũ<EFBFBD><C5A9>Ʈ <20><><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20>ε<EFBFBD><CEB5>ϱ<EFBFBD> "reload_script"
|
||||
class CCMDReload : public CConsoleCMDSingleton<CCMDReload>
|
||||
{
|
||||
virtual bool DoProcess()
|
||||
{
|
||||
SERLOG0(g_Log, "Execute console command: reload_script");
|
||||
|
||||
if(!CServerInfo::GetInstance().Reload())
|
||||
{
|
||||
CRylAdminManagerServer::GetInstance().PrintOutput("Script load failed", 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
CRylAdminManagerServer::GetInstance().PrintOutput("Script load success", 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ӽõ<D3BD> "connect_all"
|
||||
class CCMDConnectAll : public CConsoleCMDSingleton<CCMDConnectAll>
|
||||
{
|
||||
virtual bool DoProcess()
|
||||
{
|
||||
SERLOG0(g_Log, "Execute console command: connect all");
|
||||
|
||||
CAgentServerTable::GetInstance().InitAgentServerTable(
|
||||
*CRylAdminManagerServer::GetInstance().GetIOCPNet());
|
||||
|
||||
CRylAdminManagerServer::GetInstance().PrintOutput("Execute command: connect all", 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>õ<EFBFBD> Ŀ<>ǵ<EFBFBD> "connect_index %d"
|
||||
class CCMDConnect : public CConsoleCommand
|
||||
{
|
||||
protected:
|
||||
virtual CConsoleCommand* Clone(const TCHAR* szCommand, size_t nCommandLength)
|
||||
{
|
||||
CCMDConnect* lpCommand = new CCMDConnect;
|
||||
|
||||
if(0 != lpCommand)
|
||||
{
|
||||
lpCommand->m_dwServerGroupID = 0;
|
||||
|
||||
const int MAX_COMMAND = 1024;
|
||||
char szLocalCommand[MAX_COMMAND];
|
||||
|
||||
_snprintf(szLocalCommand, MAX_COMMAND - 1, "%s", szCommand);
|
||||
szLocalCommand[MAX_COMMAND - 1] = 0;
|
||||
|
||||
char* token = strtok(szLocalCommand, "\r\n\t ");
|
||||
if(0 != token)
|
||||
{
|
||||
token = strtok(0, "\r\n\t ");
|
||||
if(0 != token)
|
||||
{
|
||||
lpCommand->m_dwServerGroupID = atol(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
return lpCommand;
|
||||
}
|
||||
|
||||
virtual bool DoProcess()
|
||||
{
|
||||
SERLOG1(g_Log, "Execute command: connect_index %d", m_dwServerGroupID);
|
||||
|
||||
CAgentServerTable::GetInstance().ConnectToAgentServer(
|
||||
*CRylAdminManagerServer::GetInstance().GetIOCPNet(), m_dwServerGroupID);
|
||||
|
||||
const char* szText = "Execute command: connect_index";
|
||||
CRylAdminManagerServer::GetInstance().PrintOutput(
|
||||
szText, static_cast<int>(strlen(szText)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool Destroy()
|
||||
{
|
||||
delete this;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned long m_dwServerGroupID;
|
||||
};
|
||||
Reference in New Issue
Block a user