Skip to content

Commit c27e470

Browse files
committed
Hide default port on scoreboard
1 parent 6ef544a commit c27e470

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/src/scoreboard.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,10 @@ void renderscores(gmenu *menu, bool init)
421421
filtertext(text, s->sdesc);
422422
//for(char *p = text; (p = strchr(p, '\"')); *p++ = ' ');
423423
//text[30] = '\0'; // serverbrowser has less room - +8 chars here - 2010AUG03 - seems it was too much, falling back to 30 (for now): TODO get real width of menu as reference-width. FIXME: cutoff
424-
concatformatstring(serverline, "%s:%d %s", s->name, s->port, text);
424+
if(s->port == CUBE_DEFAULT_SERVER_PORT)
425+
concatformatstring(serverline, "%s %s", s->name, text);
426+
else
427+
concatformatstring(serverline, "%s:%d %s", s->name, s->port, text);
425428
//printf("SERVERLINE: %s\n", serverline);
426429
}
427430
}

0 commit comments

Comments
 (0)