902: Fix victim handling r=Learath2 a=heinrich5991
This commit is contained in:
bors[bot] 2017-10-16 23:41:15 +00:00
commit 5aca38e50e
2 changed files with 3 additions and 3 deletions

View file

@ -166,7 +166,7 @@ int CConsole::ParseArgs(CResult *pResult, const char *pFormat)
char *pVictim = 0;
pResult->AddArgument(pStr);
if(Command != 'v')
if(Command == 'v')
{
pVictim = pStr;
}

View file

@ -336,7 +336,7 @@ void CGameContext::ConForcePause(IConsole::IResult *pResult, void *pUserData)
CGameContext *pSelf = (CGameContext *)pUserData;
int Victim = pResult->GetVictim();
int Seconds = 0;
if (pResult->NumArguments() > 0)
if (pResult->NumArguments() > 1)
Seconds = clamp(pResult->GetInteger(1), 0, 360);
CPlayer *pPlayer = pSelf->m_apPlayers[Victim];
@ -401,7 +401,7 @@ void CGameContext::ConMuteID(IConsole::IResult *pResult, void *pUserData)
NETADDR Addr;
pSelf->Server()->GetClientAddr(Victim, &Addr);
pSelf->Mute(pResult, &Addr, clamp(pResult->GetInteger(0), 1, 86400),
pSelf->Mute(pResult, &Addr, clamp(pResult->GetInteger(1), 1, 86400),
pSelf->Server()->ClientName(Victim));
}