mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix victim handling
This commit is contained in:
parent
119ef44dd6
commit
dfc53b48cf
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue