Added PR feedback:

- Server name included in output
- Better output for unranked local
This commit is contained in:
= 2021-03-08 00:39:11 +02:00
parent f950f27424
commit f6ddfe830d
2 changed files with 7 additions and 7 deletions

View file

@ -423,7 +423,7 @@ void CGameContext::ConTeamTop5(IConsole::IResult *pResult, void *pUserData)
}
}
void CGameContext::ConTop5(IConsole::IResult *pResult, void *pUserData)
void CGameContext::ConTop(IConsole::IResult *pResult, void *pUserData)
{
CGameContext *pSelf = (CGameContext *)pUserData;
if(!CheckClientID(pResult->m_ClientID))
@ -431,15 +431,15 @@ void CGameContext::ConTop5(IConsole::IResult *pResult, void *pUserData)
if(g_Config.m_SvHideScore)
{
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "top5",
"Showing the top 5 is not allowed on this server.");
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "top",
"Showing the top is not allowed on this server.");
return;
}
if(pResult->NumArguments() > 0)
pSelf->Score()->ShowTop5(pResult->m_ClientID, pResult->GetInteger(0));
pSelf->Score()->ShowTop(pResult->m_ClientID, pResult->GetInteger(0));
else
pSelf->Score()->ShowTop5(pResult->m_ClientID);
pSelf->Score()->ShowTop(pResult->m_ClientID);
}
void CGameContext::ConTimes(IConsole::IResult *pResult, void *pUserData)

View file

@ -292,7 +292,7 @@ class CScore
static bool MapInfoThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
static bool ShowRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
static bool ShowTeamRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
static bool ShowTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
static bool ShowTopThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
static bool ShowTeamTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
static bool ShowPlayerTeamTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
static bool ShowTimesThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
@ -341,7 +341,7 @@ public:
void SaveTeamScore(int *pClientIDs, unsigned int Size, float Time, const char *pTimestamp);
void ShowTop5(int ClientID, int Offset = 1);
void ShowTop(int ClientID, int Offset = 1);
void ShowRank(int ClientID, const char *pName);
void ShowTeamTop5(int ClientID, int Offset = 1);