added %L format specifier for logging player info
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40911
This commit is contained in:
parent
30eb92174f
commit
c94e1f7a97
@ -722,6 +722,33 @@ reswitch:
|
||||
arg++;
|
||||
break;
|
||||
}
|
||||
case 'L':
|
||||
{
|
||||
CHECK_ARGS(0);
|
||||
cell_t *value;
|
||||
pCtx->LocalToPhysAddr(params[arg], &value);
|
||||
CPlayer *player = g_Players.GetPlayerByIndex(*value);
|
||||
if (!player || !player->IsConnected())
|
||||
{
|
||||
return pCtx->ThrowNativeError("Client index %d is invalid", *value);
|
||||
}
|
||||
char buffer[255];
|
||||
const char *auth = player->GetAuthString();
|
||||
if (!auth || auth[0] == '\0')
|
||||
{
|
||||
auth = "STEAM_ID_PENDING";
|
||||
}
|
||||
int userid = engine->GetPlayerUserId(player->GetEdict());
|
||||
UTIL_Format(buffer,
|
||||
sizeof(buffer),
|
||||
"%s<%d><%s><>",
|
||||
player->GetName(),
|
||||
userid,
|
||||
auth);
|
||||
AddString(&buf_p, llen, buffer, width, prec);
|
||||
arg++;
|
||||
break;
|
||||
}
|
||||
case 's':
|
||||
{
|
||||
CHECK_ARGS(0);
|
||||
|
Loading…
Reference in New Issue
Block a user