console_cmds.c
changeset 1866 87ae212e7eda
parent 1847 d94ed71b61e7
child 1868 99ba6fdbae20
equal deleted inserted replaced
1865:739183b1243a 1866:87ae212e7eda
  1084 	ttd_strlcpy(_network_player_info[_local_player].password, argv[0], sizeof(_network_player_info[_local_player].password));
  1084 	ttd_strlcpy(_network_player_info[_local_player].password, argv[0], sizeof(_network_player_info[_local_player].password));
  1085 
  1085 
  1086 	if (!_network_server)
  1086 	if (!_network_server)
  1087 		SEND_COMMAND(PACKET_CLIENT_SET_PASSWORD)(_network_player_info[_local_player].password);
  1087 		SEND_COMMAND(PACKET_CLIENT_SET_PASSWORD)(_network_player_info[_local_player].password);
  1088 
  1088 
       
  1089 	IConsolePrintF(_icolour_warn, "'company_pw' changed to:  %s", _network_player_info[_local_player].password);
       
  1090 
  1089 	return true;
  1091 	return true;
  1090 }
  1092 }
  1091 
  1093 
  1092 DEF_CONSOLE_HOOK(ConProcPlayerName)
  1094 DEF_CONSOLE_HOOK(ConProcPlayerName)
  1093 {
  1095 {
  1134 
  1136 
  1135 	if (argc != 1) return false;
  1137 	if (argc != 1) return false;
  1136 
  1138 
  1137 	_network_server_bind_ip = inet_addr(argv[0]);
  1139 	_network_server_bind_ip = inet_addr(argv[0]);
  1138 	snprintf(_network_server_bind_ip_host, sizeof(_network_server_bind_ip_host), "%s", inet_ntoa(*(struct in_addr *)&_network_server_bind_ip));
  1140 	snprintf(_network_server_bind_ip_host, sizeof(_network_server_bind_ip_host), "%s", inet_ntoa(*(struct in_addr *)&_network_server_bind_ip));
       
  1141 	IConsolePrintF(_icolour_warn, "'server_ip' changed to:  %s", inet_ntoa(*(struct in_addr *)&_network_server_bind_ip));
  1139 	return true;
  1142 	return true;
  1140 }
  1143 }
  1141 
  1144 
  1142 DEF_CONSOLE_CMD(ConPatch)
  1145 DEF_CONSOLE_CMD(ConPatch)
  1143 {
  1146 {