From 37a60fa83a2e5a17ee1b3be56f98479a06b810eb Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Sun, 25 Sep 2011 19:12:09 +0000 Subject: * Unregister commands advertised by the server when disconnecting Now that builtin commands can't be removed, this should be safe --- src/game/g_cmds.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/game/g_cmds.c') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 8461981f..b8e90239 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -3246,6 +3246,10 @@ void G_ListCommands( gentity_t *ent ) for( i = 0; i < numCmds; i++ ) { + // never advertise cheats + if( cmds[ i ].cmdFlags & CMD_CHEAT ) + continue; + len = strlen( cmds[ i ].cmdName ) + 1; if( len + outlen >= sizeof( out ) - 1 ) { -- cgit