| 3782 | } |
| 3783 | |
| 3784 | void CServer::ConAuthRemove(IConsole::IResult *pResult, void *pUser) |
| 3785 | { |
| 3786 | CServer *pThis = (CServer *)pUser; |
| 3787 | CAuthManager *pManager = &pThis->m_AuthManager; |
| 3788 | |
| 3789 | const char *pIdent = pResult->GetString(0); |
| 3790 | |
| 3791 | int KeySlot = pManager->FindKey(pIdent); |
| 3792 | if(KeySlot == -1) |
| 3793 | { |
| 3794 | pThis->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "auth", "ident couldn't be found"); |
| 3795 | return; |
| 3796 | } |
| 3797 | |
| 3798 | pThis->AuthRemoveKey(KeySlot); |
| 3799 | |
| 3800 | if(!pManager->NumNonDefaultKeys()) |
| 3801 | pThis->SendRconType(-1, false); |
| 3802 | |
| 3803 | pThis->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "auth", "key removed, all users logged out"); |
| 3804 | } |
| 3805 | |
| 3806 | static void ListKeysCallback(const char *pIdent, const char *pRoleName, void *pUser) |
| 3807 | { |
nothing calls this directly
no test coverage detected