mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
parent
5de7f9a858
commit
35cf8832a9
|
@ -32,7 +32,6 @@ public:
|
|||
virtual bool ClientIngame(int ClientID) = 0;
|
||||
virtual int GetClientInfo(int ClientID, CClientInfo *pInfo) = 0;
|
||||
virtual void GetClientAddr(int ClientID, char *pAddrStr, int Size) = 0;
|
||||
virtual void RestrictRconOutput(int ClientID) = 0;
|
||||
|
||||
virtual int SendMsg(CMsgPacker *pMsg, int Flags, int ClientID) = 0;
|
||||
|
||||
|
|
|
@ -313,8 +313,6 @@ CServer::CServer() : m_DemoRecorder(&m_SnapshotDelta)
|
|||
m_RconClientID = IServer::RCON_CID_SERV;
|
||||
m_RconAuthLevel = AUTHED_ADMIN;
|
||||
|
||||
m_RconRestrict = -1;
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
|
@ -791,7 +789,7 @@ void CServer::SendRconLineAuthed(const char *pLine, void *pUser)
|
|||
|
||||
for(i = 0; i < MAX_CLIENTS; i++)
|
||||
{
|
||||
if(pThis->m_aClients[i].m_State != CClient::STATE_EMPTY && pThis->m_aClients[i].m_Authed >= pThis->m_RconAuthLevel && (pThis->m_RconRestrict == -1 || pThis->m_RconRestrict == i))
|
||||
if(pThis->m_aClients[i].m_State != CClient::STATE_EMPTY && pThis->m_aClients[i].m_Authed >= pThis->m_RconAuthLevel)
|
||||
pThis->SendRconLine(i, pLine);
|
||||
}
|
||||
|
||||
|
|
|
@ -169,8 +169,6 @@ public:
|
|||
CRegister m_Register;
|
||||
CMapChecker m_MapChecker;
|
||||
|
||||
int m_RconRestrict;
|
||||
|
||||
CServer();
|
||||
|
||||
int TrySetClientName(int ClientID, const char *pName);
|
||||
|
@ -258,7 +256,6 @@ public:
|
|||
int m_aPrevStates[MAX_CLIENTS];
|
||||
char *GetAnnouncementLine(char const *FileName);
|
||||
unsigned m_AnnouncementLastLine;
|
||||
void RestrictRconOutput(int ClientID) { m_RconRestrict = ClientID; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -812,7 +812,6 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
}
|
||||
|
||||
m_ChatResponseTargetID = ClientID;
|
||||
Server()->RestrictRconOutput(ClientID);
|
||||
Console()->SetFlagMask(CFGFLAG_CHAT);
|
||||
|
||||
if (pPlayer->m_Authed)
|
||||
|
@ -829,7 +828,6 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
Console()->SetAccessLevel(IConsole::ACCESS_LEVEL_ADMIN);
|
||||
Console()->SetFlagMask(CFGFLAG_SERVER);
|
||||
m_ChatResponseTargetID = -1;
|
||||
Server()->RestrictRconOutput(-1);
|
||||
}
|
||||
else
|
||||
SendChat(ClientID, Team, pMsg->m_pMessage, ClientID);
|
||||
|
|
Loading…
Reference in a new issue