From d95a1e2ff3d4e57ea6b2ada2d9f3b6d396889e2d Mon Sep 17 00:00:00 2001 From: Louis-Antoine Date: Fri, 15 Nov 2019 17:50:40 +0100 Subject: [PATCH] Make the "nodes" command clearer Because literally anyone who isn't a dev has no idea what those fucking numbers even mean... Before: $nodes 00 - Sonic - 01 - 666.66.420.42:5029 01 - Tales - 00 - self 02 - Nukes - 255 03 - Ammie - 255 04 - Fangs - 255 05 - Metal - 255 After: $nodes 00 - Sonic - node 01 - 666.66.420.42:5029 01 - Tales - node 00 - self 02 - Nukes 03 - Ammie 04 - Fangs 05 - Metal --- src/d_clisrv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index a92619a34..a35303982 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2588,9 +2588,13 @@ static void Command_Nodes(void) if (playeringame[i]) { CONS_Printf("%.2u: %*s", i, (int)maxlen, player_names[i]); - CONS_Printf(" - %.2d", playernode[i]); - if (I_GetNodeAddress && (address = I_GetNodeAddress(playernode[i])) != NULL) - CONS_Printf(" - %s", address); + + if (playernode[i] != UINT8_MAX) + { + CONS_Printf(" - node %.2d", playernode[i]); + if (I_GetNodeAddress && (address = I_GetNodeAddress(playernode[i])) != NULL) + CONS_Printf(" - %s", address); + } if (IsPlayerAdmin(i)) CONS_Printf(M_GetText(" (verified admin)"));