src/console_cmds.cpp
changeset 7725 a44140f11d8a
parent 7306 dfd61358ad88
child 7763 342e5357b592
equal deleted inserted replaced
7724:b056c58fb5d9 7725:a44140f11d8a
   591 	return true;
   591 	return true;
   592 }
   592 }
   593 
   593 
   594 DEF_CONSOLE_HOOK(ConHookValidateMaxClientsCount)
   594 DEF_CONSOLE_HOOK(ConHookValidateMaxClientsCount)
   595 {
   595 {
   596 	/* XXX - hardcoded, string limiation -- TrueLight
   596 	if (_network_game_info.clients_max > MAX_CLIENTS) {
   597 	 * XXX - also see network.c:NetworkStartup ~1356 */
   597 		_network_game_info.clients_max = MAX_CLIENTS;
   598 	if (_network_game_info.clients_max > 10) {
       
   599 		_network_game_info.clients_max = 10;
       
   600 		IConsoleError("Maximum clients out of bounds, truncating to limit.");
   598 		IConsoleError("Maximum clients out of bounds, truncating to limit.");
   601 	}
   599 	}
   602 
   600 
   603 	return true;
   601 	return true;
   604 }
   602 }