mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-06 18:08:36 +00:00
Use userid to find client when possible
Only fall back to authid lookup if userid no longer resolved to client index
This commit is contained in:
parent
f9ec38103a
commit
5ac6be0497
@ -67,7 +67,12 @@ void PrepareBan(int adminClient, int banTargetUserId, const char[] banTargetAuth
|
||||
}
|
||||
}
|
||||
|
||||
int target = GetClientOfAuthId(banTargetAuthId);
|
||||
int target = (banTargetUserId == 0) ? 0 : GetClientOfUserId(banTargetUserId);
|
||||
if (target == 0)
|
||||
{
|
||||
target = GetClientOfAuthId(banTargetAuthId);
|
||||
}
|
||||
|
||||
// Ban & kick if target is connected, else record the ban with authid
|
||||
if (target != 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user