Deprecate FormatUserLogText (#856)

Allow client index 0, too. (Console)
This commit is contained in:
ddhoward 2018-07-31 19:19:18 -07:00 committed by Michael Flaherty
parent 7068c3e865
commit beaf812909

View File

@ -36,31 +36,18 @@
#define _helpers_included
/**
* Formats a user's info as log text. This is usually not needed because
* %L can be used to auto-format client information into a string.
* This function is deprecated. Use the %L format specifier instead.
*
* Formats a user's info as log text.
*
* @param client Client index.
* @param buffer Buffer for text.
* @param maxlength Maximum length of text.
*/
#pragma deprecated Use the %L format specifier instead.
stock void FormatUserLogText(int client, char[] buffer, int maxlength)
{
char auth[32];
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);
FormatEx(buffer, maxlength, "\"%L\"", client);
}
/**