Changeset - r28749:62e6a2924a0b
[Not reviewed]
master
0 1 0
Loïc Guilloux - 3 months ago 2024-02-12 19:28:30
glx22@users.noreply.github.com
Fix #12074: Don't allow "part" command for dedicated servers (#12075)
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/console_cmds.cpp
Show inline comments
 
@@ -1710,12 +1710,17 @@ DEF_CONSOLE_CMD(ConPart)
 
		IConsolePrint(CC_HELP, "Leave the currently joined/running game (only ingame). Usage: 'part'.");
 
		return true;
 
	}
 

	
 
	if (_game_mode != GM_NORMAL) return false;
 

	
 
	if (_network_dedicated) {
 
		IConsolePrint(CC_ERROR, "A dedicated server can not leave the game.");
 
		return false;
 
	}
 

	
 
	_switch_mode = SM_MENU;
 
	return true;
 
}
 

	
 
DEF_CONSOLE_CMD(ConHelp)
 
{
0 comments (0 inline, 0 general)