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 6f3fca9..1bb51fd 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 db36db5..d666627 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"