-
-
Notifications
You must be signed in to change notification settings - Fork 457
Allow client 0 in FormatUserLogText #856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, congrats on your first contribution.
Modifying FormatUserLogText to allow client 0 to be passed.