-
Notifications
You must be signed in to change notification settings - Fork 175
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
Detailed KickClient message #504
Conversation
Print which admin ban the client, the reason and the length of the ban.
if(time == 0) | ||
Format(length, sizeof(length), "permament"); | ||
else | ||
Format(length, sizeof(length), "%d %s", time, time == 1 ? "minute" : "minutes"); |
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.
Why Format
? I suggest FormatEx
.
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.
Why would you suggest FormatEx
over Format
?
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.
Faster. Format
uses a temporary buffer, and after format operations, copies to passed buffer. FormatEx
writes directly to passed buffer.
Is it possible to add when you are already banned a info message? That info only shows up when you are banned, after if you try to join again just say the usual message. And I'm getting this error: [SM] Warning(s) encountered in translation file "sourcebans.phrases.txt" |
SourceMod doesn't love spaces in the format. |
One suggestion would be beyond the options that @R3TROATTACK cited more information to identify ADMIN that banned, example:
It would be possible? I believe it would be more agrarable to visualize and easier to identify the ADMIN that applied the ban. |
I personally prefer it the way it is but if anyone else thinks it would be better that way I would be fine changing this. |
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.
Tested all changes to date, everything looks good, definitely a nice QoL change.
This is a quality of life change that I was asked to make it makes it so that the disconnect menu shows more information about your ban.
Description
The disconnect box(at least in csgo) allows you to format it with new lines and html I made it so that it would show which admin banned you, the reason and the length of the ban on the initial ban. Reconnecting to the server after the ban will show you the standard ban message
Motivation and Context
QOL #468
How Has This Been Tested?
I have tested this on a windows csgo server with just base sourcemod and sbpp. I tested this by banning myself to check if the message pops up when it should.
Screenshots (if appropriate):
Types of changes
Checklist: