]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make sure names aren't truncated to 0 length on old servers and increase the soft...
authorMario <mario@smbclan.net>
Sat, 27 Apr 2019 11:26:46 +0000 (21:26 +1000)
committerMario <mario@smbclan.net>
Sat, 27 Apr 2019 11:26:46 +0000 (21:26 +1000)
qcsrc/server/client.qc
xonotic-server.cfg

index 6f3fca9fced833ef83eecadaf04fba6a17019104..1bb51fdb7230907caed5b35a7e331278217f38d6 100644 (file)
@@ -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"));
index db36db5b79cf2d952bf09addf7970f0dab2ea803..d66662749674d8a96dd734d80fdd587b17eb5a7b 100644 (file)
@@ -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"