Fixed BanClient() crashing if called before certain callbacks (bug 3912, r=pred).
This commit is contained in:
parent
3cfc45c4e8
commit
852eb5c524
@ -377,7 +377,7 @@ static cell_t BanClient(IPluginContext *pContext, const cell_t *params)
|
|||||||
/* Kick, then ban */
|
/* Kick, then ban */
|
||||||
if ((ban_flags & BANFLAG_NOKICK) != BANFLAG_NOKICK)
|
if ((ban_flags & BANFLAG_NOKICK) != BANFLAG_NOKICK)
|
||||||
{
|
{
|
||||||
pPlayer->Kick(kick_message);
|
g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), kick_message);
|
||||||
}
|
}
|
||||||
engine->ServerCommand(command);
|
engine->ServerCommand(command);
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ static cell_t BanClient(IPluginContext *pContext, const cell_t *params)
|
|||||||
}
|
}
|
||||||
else if ((ban_flags & BANFLAG_NOKICK) != BANFLAG_NOKICK)
|
else if ((ban_flags & BANFLAG_NOKICK) != BANFLAG_NOKICK)
|
||||||
{
|
{
|
||||||
pPlayer->Kick(kick_message);
|
g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), kick_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user