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 Stan)

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)

cinput_maximum_length.patch (1.3 KB ) - added by Vladislav Belov 8 years ago.
cinput_maximum_length_v1.1.patch (1.9 KB ) - added by Vladislav Belov 8 years ago.
cinput_maximum_length_v1.2.patch (2.1 KB ) - added by Vladislav Belov 8 years ago.
cinput_maximum_length_v1.3.patch (2.1 KB ) - added by Vladislav Belov 8 years ago.
cinput_maximum_length_v1.4.patch (2.2 KB ) - added by Vladislav Belov 8 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 by elexis, 8 years ago

Component: Core engineMultiplayer lobby
Keywords: lobby removed

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.

comment:2 by Stan, 8 years ago

Description: modified (diff)
Summary: Unlimited server name lenghtServer name length should be limited

comment:3 by xeramon, 8 years ago

Keywords: simple added

comment:4 by Vladislav Belov, 8 years ago

Keywords: review added
Owner: set to Vladislav Belov
Summary: Server name length should be limited[PATCH] Server name length should be limited

by Vladislav Belov, 8 years ago

Attachment: cinput_maximum_length.patch added

by Vladislav Belov, 8 years ago

by Vladislav Belov, 8 years ago

by Vladislav Belov, 8 years ago

by Vladislav Belov, 8 years ago

comment:5 by historic_bruno, 8 years ago

Keywords: patch added; review removed
Milestone: BacklogAlpha 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.

Last edited 8 years ago by historic_bruno (previous) (diff)

in reply to:  5 ; comment:6 by elexis, 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.

in reply to:  6 comment:7 by historic_bruno, 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 elexis, 8 years ago

Priority: Should HaveNice 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.

Last edited 8 years ago by elexis (previous) (diff)

comment:9 by Itms, 8 years ago

Milestone: Alpha 20Alpha 21

comment:10 by elexis, 8 years ago

Backlogging due to lack of progress.

comment:11 by elexis, 8 years ago

Milestone: Alpha 21Backlog

comment:12 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:13 by Silier, 3 years ago

Keywords: simple added
Note: See TracTickets for help on using tickets.