fixed 'cmdlist' rcon command for joining clients

This commit is contained in:
heinrich5991 2010-11-11 23:22:09 +01:00
parent c36eb3d359
commit c54b824a45
4 changed files with 17 additions and 16 deletions

View file

@ -1524,6 +1524,22 @@ void CServer::ConMapReload(IConsole::IResult *pResult, void *pUser, int ClientId
((CServer *)pUser)->m_MapReload = 1; ((CServer *)pUser)->m_MapReload = 1;
} }
void CServer::ConCmdList(IConsole::IResult *pResult, void *pUserData, int ClientId)
{
CServer *pSelf = (CServer *)pUserData;
if(pSelf->m_aClients[ClientId].m_Authed == 3)
{
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "O Really!!, You call yourself an admin!!");
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "check the documentation on DDRace.info");
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "leave cmdlist for others.. too many commands to show you here");
}
else
pSelf->Console()->List(pSelf->m_aClients[ClientId].m_Authed, CFGFLAG_SERVER);
}
void CServer::ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData) void CServer::ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
{ {
pfnCallback(pResult, pCallbackUserData, -1); pfnCallback(pResult, pCallbackUserData, -1);

View file

@ -210,6 +210,7 @@ public:
static void ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); static void ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
static void ConchainMaxclientsperipUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); static void ConchainMaxclientsperipUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
static void ConLogin(IConsole::IResult *pResult, void *pUser, int ClientId); static void ConLogin(IConsole::IResult *pResult, void *pUser, int ClientId);
static void ConCmdList(IConsole::IResult *pResult, void *pUser, int ClientId);
static bool CompareClients(int ClientId, int Victim, void *pUser); static bool CompareClients(int ClientId, int Victim, void *pUser);
static bool ClientOnline(int ClientId, void *pUser); static bool ClientOnline(int ClientId, void *pUser);

View file

@ -1778,21 +1778,6 @@ void CGameContext::ConInfo(IConsole::IResult *pResult, void *pUserData, int Clie
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "Or visit DDRace.info"); pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "Or visit DDRace.info");
} }
void CGameContext::ConCmdList(IConsole::IResult *pResult, void *pUserData, int ClientId)
{
CGameContext *pSelf = (CGameContext *)pUserData;
if(pSelf->m_apPlayers[ClientId]->m_Authed == 3)
{
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "O Really!!, You call yourself an admin!!");
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "check the documentation on DDRace.info");
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "leave cmdlist for others.. too many commands to show you here");
}
else
pSelf->Console()->List(pSelf->m_apPlayers[ClientId]->m_Authed, CFGFLAG_SERVER);
}
void CGameContext::ConHelp(IConsole::IResult *pResult, void *pUserData, int ClientId) void CGameContext::ConHelp(IConsole::IResult *pResult, void *pUserData, int ClientId)
{ {
CGameContext *pSelf = (CGameContext *)pUserData; CGameContext *pSelf = (CGameContext *)pUserData;

View file

@ -112,7 +112,6 @@ class CGameContext : public IGameServer
static void ConCredits(IConsole::IResult *pResult, void *pUserData, int ClientId); static void ConCredits(IConsole::IResult *pResult, void *pUserData, int ClientId);
static void ConInfo(IConsole::IResult *pResult, void *pUserData, int ClientId); static void ConInfo(IConsole::IResult *pResult, void *pUserData, int ClientId);
static void ConCmdList(IConsole::IResult *pResult, void *pUserData, int ClientId);
static void ConHelp(IConsole::IResult *pResult, void *pUserData, int ClientId); static void ConHelp(IConsole::IResult *pResult, void *pUserData, int ClientId);
static void ConFlags(IConsole::IResult *pResult, void *pUserData, int ClientId); static void ConFlags(IConsole::IResult *pResult, void *pUserData, int ClientId);
static void ConRules(IConsole::IResult *pResult, void *pUserData, int ClientId); static void ConRules(IConsole::IResult *pResult, void *pUserData, int ClientId);