| 493 | } |
| 494 | |
| 495 | void CServer::Kick(int ClientId, const char *pReason) |
| 496 | { |
| 497 | if(ClientId < 0 || ClientId >= MAX_CLIENTS || m_aClients[ClientId].m_State == CClient::STATE_EMPTY) |
| 498 | { |
| 499 | Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", "invalid client id to kick"); |
| 500 | return; |
| 501 | } |
| 502 | else if(m_RconClientId == ClientId) |
| 503 | { |
| 504 | Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", "you can't kick yourself"); |
| 505 | return; |
| 506 | } |
| 507 | else if(GetAuthedState(ClientId) > m_RconAuthLevel) |
| 508 | { |
| 509 | Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", "kick command denied"); |
| 510 | return; |
| 511 | } |
| 512 | |
| 513 | m_NetServer.Drop(ClientId, pReason); |
| 514 | } |
| 515 | |
| 516 | void CServer::Ban(int ClientId, int Seconds, const char *pReason, bool VerbatimReason) |
| 517 | { |
no test coverage detected