From: Mario Date: Sat, 27 Apr 2019 11:26:46 +0000 (+1000) Subject: Make sure names aren't truncated to 0 length on old servers and increase the soft... X-Git-Tag: xonotic-v0.8.5~1520 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=22e8d4dc45e799cdac563385a6562c5a204b7154;p=xonotic%2Fxonotic-data.pk3dir.git Make sure names aren't truncated to 0 length on old servers and increase the soft limit of name lengths to 64 (not including colour codes) --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 6f3fca9fc..1bb51fdb7 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2397,7 +2397,7 @@ void PlayerPreThink (entity this) if (this.netname == "" || this.netname != CS(this).netname_previous) { bool assume_unchanged = (CS(this).netname_previous == ""); - if (strlennocol(this.netname) > autocvar_name_maxlength) + if (autocvar_name_maxlength > 0 && strlennocol(this.netname) > autocvar_name_maxlength) { int new_length = textLengthUpToLength(this.netname, autocvar_name_maxlength, strlennocol); this.netname = strzone(strcat(substring(this.netname, 0, new_length), "^7")); diff --git a/xonotic-server.cfg b/xonotic-server.cfg index db36db5b7..d66662749 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -2,7 +2,7 @@ // note that it doesn't reset all server cvars, // some are shared with the client and so are left in xonotic-common.cfg -set name_maxlength 30 "max player name length (not counting color codes) allowed by the server" +set name_maxlength 64 "max player name length (not counting color codes) allowed by the server" // taunts and voices set sv_taunt 1 "allow taunts on the server"