Opened 8 years ago
Last modified 3 years ago
#3651 new defect
[PATCH] Server name length should be limited
Reported by: | xeramon | Owned by: | Vladislav Belov |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Multiplayer lobby | Keywords: | patch, simple |
Cc: | Patch: |
Description (last modified by )
Server name's length is currently unlimited, so you can type as much text for the server name as you want. The table in the lobby trims it, but the name should still be limited.
Attachments (5)
Change History (18)
comment:1 by , 8 years ago
Component: | Core engine → Multiplayer lobby |
---|---|
Keywords: | lobby removed |
comment:2 by , 8 years ago
Description: | modified (diff) |
---|---|
Summary: | Unlimited server name lenght → Server name length should be limited |
comment:3 by , 8 years ago
Keywords: | simple added |
---|
comment:4 by , 8 years ago
Keywords: | review added |
---|---|
Owner: | set to |
Summary: | Server name length should be limited → [PATCH] Server name length should be limited |
by , 8 years ago
Attachment: | cinput_maximum_length.patch added |
---|
by , 8 years ago
Attachment: | cinput_maximum_length_v1.1.patch added |
---|
by , 8 years ago
Attachment: | cinput_maximum_length_v1.2.patch added |
---|
by , 8 years ago
Attachment: | cinput_maximum_length_v1.3.patch added |
---|
by , 8 years ago
Attachment: | cinput_maximum_length_v1.4.patch added |
---|
follow-up: 6 comment:5 by , 8 years ago
Keywords: | patch added; review removed |
---|---|
Milestone: | Backlog → Alpha 20 |
I've always found it quite annoying to be artificially limited by things like this. A player could use a smaller UI size, a higher resolution, or a different font, and have plenty of room for longer server names, or the opposite could happen, which the patch doesn't consider. I don't see the problem if the GUI already handles it correctly in all those cases. Maybe having a high limit like 1024 to prevent outright abuse.
Regarding the patch, the max_length
property should check pasted text as well.
follow-up: 7 comment:6 by , 8 years ago
Replying to historic_bruno:
I've always found it quite annoying to be artificially limited by things like this.
Why? People shouldn't tell long stories in their servername, even if there was sufficient space to display it. The list already limits the servername (r16895), but it should have a more sensible limit.
We came up with the number 48 as it the maximum number of repeats of the character i that can still be displayed in a 1024x768 window (It also is the length of "Ahmed's really really way too long servername"). If you repeat capital Ms, only 24 characters can fit into the window.
the
max_length
property should check pasted text as well.
Thanks for noting, that should be done.
comment:7 by , 8 years ago
Replying to elexis:
Why? People shouldn't tell long stories in their servername, even if there was sufficient space to display it. The list already limits the servername (r16895), but it should have a more sensible limit.
I think I mentioned the reasons, but mostly because it's fun sometimes to use a long name as a private joke with friends. And since there's no technical reason to limit the name (it's not the 1980s afterall), and I'm not sure that it harms anyone's lobby experience, I would just leave it alone. Or well, if you feel a limit is really important, don't base it just on what's visible but make it so long that no one could complain about it being unreasonable.
OpenTTD is one game I was thinking of, and while it no doubt seemed a great idea to the programmers, I have several times been 1-2 characters short of a funny name I wanted to use. At least they have a valid excuse, being based on an ancient DOS game from the days when every byte was precious :D
We came up with the number 48 as it the maximum number of repeats of the character i that can still be displayed in a 1024x768 window (It also is the length of "Ahmed's really really way too long servername"). If you repeat capital Ms, only 24 characters can fit into the window.
I actually think that demonstrates perfectly that an arbitrary limit of length is kind of a bad idea :) What looks reasonable depends on resolution (most people are over 1024x768), font, and GUI scale. If we change font size or type, or adjust the GUI (and that is quite likely given how many times it has already happened), then we have multiple server and client side limits that could be adjusted, and that just seems yucky and unnecessary to me.
comment:8 by , 8 years ago
Priority: | Should Have → Nice to Have |
---|
In that case we should either close as won't fix or pick the the largest value that protocol, database and gui support.
comment:9 by , 8 years ago
Milestone: | Alpha 20 → Alpha 21 |
---|
comment:11 by , 8 years ago
Milestone: | Alpha 21 → Backlog |
---|
comment:12 by , 3 years ago
Keywords: | simple removed |
---|---|
severity: | → simple |
comment:13 by , 3 years ago
Keywords: | simple added |
---|
Notice the clipping in the (lobby) list was added in r16895. The length should be limited in the GUI input of the servername as well as the
XpartaMupp
script.