1.1 --- a/core/sm_stringutil.cpp Thu Jun 07 04:08:34 2007 +0000
1.2 +++ b/core/sm_stringutil.cpp Thu Jun 07 04:47:03 2007 +0000
1.3 @@ -722,6 +722,33 @@
1.4 arg++;
1.5 break;
1.6 }
1.7 + case 'L':
1.8 + {
1.9 + CHECK_ARGS(0);
1.10 + cell_t *value;
1.11 + pCtx->LocalToPhysAddr(params[arg], &value);
1.12 + CPlayer *player = g_Players.GetPlayerByIndex(*value);
1.13 + if (!player || !player->IsConnected())
1.14 + {
1.15 + return pCtx->ThrowNativeError("Client index %d is invalid", *value);
1.16 + }
1.17 + char buffer[255];
1.18 + const char *auth = player->GetAuthString();
1.19 + if (!auth || auth[0] == '\0')
1.20 + {
1.21 + auth = "STEAM_ID_PENDING";
1.22 + }
1.23 + int userid = engine->GetPlayerUserId(player->GetEdict());
1.24 + UTIL_Format(buffer,
1.25 + sizeof(buffer),
1.26 + "%s<%d><%s><>",
1.27 + player->GetName(),
1.28 + userid,
1.29 + auth);
1.30 + AddString(&buf_p, llen, buffer, width, prec);
1.31 + arg++;
1.32 + break;
1.33 + }
1.34 case 's':
1.35 {
1.36 CHECK_ARGS(0);