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"));
// 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"