Allow client 0 in FormatUserLogText#856
Conversation
Modifying FormatUserLogText to allow client 0 to be passed.
plugins/include/helpers.inc
Outdated
| else | ||
| { | ||
| strcopy(name, sizeof(name), "UNKNOWN"); | ||
| strcopy(auth, sizeof(auth), "Console"); |
There was a problem hiding this comment.
We probably want CONSOLE here? I'm not sure, do most games have it as a name and not an entire capitalized string now?
There was a problem hiding this comment.
It's Console in TF2, as well as in the %L and %N explanations on the wiki:
https://wiki.alliedmods.net/Format_Class_Functions_(SourceMod_Scripting)#Format_Specifiers
I am not sure about other games.
There was a problem hiding this comment.
Honestly, maybe the whole function should just be marked as deprecated and the body replaced with a FormatEx(buffer, maxlength, "%L", client); Or just the second thing, idk.
|
Well you know what, we should just be using %N here regardless instead of filling a magical buffer. |
|
For some reason I was under the impression that %N would have the same behavior as Regardless, is there any reason why the whole thing can't just be replaced with: This should guarantee consistency. |
|
This may be |
Updating my previous FormatUserLogText() change. This change guarantees consistency, is much simpler, and allows client 0 to be passed.
|
We should mark it as deprecated alongside this change I think. |
Headline
left a comment
There was a problem hiding this comment.
This looks good, congrats on your first contribution.
Modifying FormatUserLogText to allow client 0 to be passed.