| 2034 | } |
| 2035 | |
| 2036 | void CServer::OnNetMsgRconCmd(int ClientId, const char *pCmd) |
| 2037 | { |
| 2038 | if(!str_comp(pCmd, "crashmeplx")) |
| 2039 | { |
| 2040 | int Version = m_aClients[ClientId].m_DDNetVersion; |
| 2041 | if(GameServer()->PlayerExists(ClientId) && Version < VERSION_DDNET_OLD) |
| 2042 | { |
| 2043 | m_aClients[ClientId].m_DDNetVersion = VERSION_DDNET_OLD; |
| 2044 | } |
| 2045 | } |
| 2046 | else if(IsRconAuthed(ClientId)) |
| 2047 | { |
| 2048 | if(GameServer()->PlayerExists(ClientId)) |
| 2049 | { |
| 2050 | log_info("server", "ClientId=%d key='%s' rcon='%s'", ClientId, GetAuthName(ClientId), pCmd); |
| 2051 | m_RconClientId = ClientId; |
| 2052 | m_RconAuthLevel = GetAuthedState(ClientId); |
| 2053 | { |
| 2054 | CRconClientLogger Logger(this, ClientId); |
| 2055 | CLogScope Scope(&Logger); |
| 2056 | Console()->ExecuteLineFlag(pCmd, CFGFLAG_SERVER, ClientId); |
| 2057 | } |
| 2058 | m_RconClientId = IServer::RCON_CID_SERV; |
| 2059 | m_RconAuthLevel = AUTHED_ADMIN; |
| 2060 | } |
| 2061 | } |
| 2062 | } |
| 2063 | |
| 2064 | void CServer::OnNetMsgRconAuth(int ClientId, const char *pName, const char *pPw, bool SendRconCmds) |
| 2065 | { |
nothing calls this directly
no test coverage detected