Deprecate FormatUserLogText (#856)
Allow client index 0, too. (Console)
This commit is contained in:
parent
7068c3e865
commit
beaf812909
@ -36,31 +36,18 @@
|
|||||||
#define _helpers_included
|
#define _helpers_included
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats a user's info as log text. This is usually not needed because
|
* This function is deprecated. Use the %L format specifier instead.
|
||||||
* %L can be used to auto-format client information into a string.
|
*
|
||||||
|
* Formats a user's info as log text.
|
||||||
*
|
*
|
||||||
* @param client Client index.
|
* @param client Client index.
|
||||||
* @param buffer Buffer for text.
|
* @param buffer Buffer for text.
|
||||||
* @param maxlength Maximum length of text.
|
* @param maxlength Maximum length of text.
|
||||||
*/
|
*/
|
||||||
|
#pragma deprecated Use the %L format specifier instead.
|
||||||
stock void FormatUserLogText(int client, char[] buffer, int maxlength)
|
stock void FormatUserLogText(int client, char[] buffer, int maxlength)
|
||||||
{
|
{
|
||||||
char auth[32];
|
FormatEx(buffer, maxlength, "\"%L\"", client);
|
||||||
char name[MAX_NAME_LENGTH];
|
|
||||||
|
|
||||||
int userid = GetClientUserId(client);
|
|
||||||
if (!GetClientAuthId(client, AuthId_Engine, auth, sizeof(auth)))
|
|
||||||
{
|
|
||||||
strcopy(auth, sizeof(auth), "UNKNOWN");
|
|
||||||
}
|
|
||||||
if (!GetClientName(client, name, sizeof(name)))
|
|
||||||
{
|
|
||||||
strcopy(name, sizeof(name), "UNKNOWN");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Currently, no team stuff ... */
|
|
||||||
|
|
||||||
Format(buffer, maxlength, "\"%s<%d><%s><>\"", name, userid, auth);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user