mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
increased client version and send maplist infos only to clients that can handle them
This commit is contained in:
parent
bc38f67750
commit
8df97e42cf
|
@ -1015,7 +1015,8 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
|||
|
||||
m_aClients[ClientID].m_Authed = AUTHED_ADMIN;
|
||||
m_aClients[ClientID].m_pRconCmdToSend = Console()->FirstCommandInfo(IConsole::ACCESS_LEVEL_ADMIN, CFGFLAG_SERVER);
|
||||
m_aClients[ClientID].m_pMapListEntryToSend = m_pFirstMapEntry;
|
||||
if(m_aClients[ClientID].m_Version >= MIN_MAPLIST_CLIENTVERSION)
|
||||
m_aClients[ClientID].m_pMapListEntryToSend = m_pFirstMapEntry;
|
||||
SendRconLine(ClientID, "Admin authentication successful. Full remote console access granted.");
|
||||
char aBuf[256];
|
||||
str_format(aBuf, sizeof(aBuf), "ClientID=%d authed (admin)", ClientID);
|
||||
|
@ -1030,7 +1031,7 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
|||
m_aClients[ClientID].m_pRconCmdToSend = Console()->FirstCommandInfo(IConsole::ACCESS_LEVEL_MOD, CFGFLAG_SERVER);
|
||||
SendRconLine(ClientID, "Moderator authentication successful. Limited remote console access granted.");
|
||||
const IConsole::CCommandInfo *pInfo = Console()->GetCommandInfo("sv_map", CFGFLAG_SERVER, false);
|
||||
if(pInfo && pInfo->GetAccessLevel() == IConsole::ACCESS_LEVEL_MOD)
|
||||
if(pInfo && pInfo->GetAccessLevel() == IConsole::ACCESS_LEVEL_MOD && m_aClients[ClientID].m_Version >= MIN_MAPLIST_CLIENTVERSION)
|
||||
m_aClients[ClientID].m_pMapListEntryToSend = m_pFirstMapEntry;
|
||||
char aBuf[256];
|
||||
str_format(aBuf, sizeof(aBuf), "ClientID=%d authed (moderator)", ClientID);
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
|
||||
MAX_RCONCMD_SEND=16,
|
||||
MAX_MAPLISTENTRY_SEND = 32,
|
||||
MIN_MAPLIST_CLIENTVERSION=0x0703, // todo 0.8: remove me
|
||||
MAX_RCONCMD_RATIO=8,
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
#include <generated/nethash.cpp>
|
||||
#define GAME_VERSION "0.7.2"
|
||||
#define GAME_NETVERSION "0.7 " GAME_NETVERSION_HASH
|
||||
#define CLIENT_VERSION 0x0702
|
||||
#define CLIENT_VERSION 0x0703
|
||||
static const char GAME_RELEASE_VERSION[8] = "0.7.2";
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue