console_cmds.c
changeset 678 f62cae2abc0c
parent 666 49beb75bb3a2
child 688 1bf7db6d29b7
equal deleted inserted replaced
677:e3c1348781b1 678:f62cae2abc0c
   716 			IConsolePrint(_iconsole_color_warning, "Usage: set server_bind_ip <ip>.");
   716 			IConsolePrint(_iconsole_color_warning, "Usage: set server_bind_ip <ip>.");
   717 		}
   717 		}
   718 		return NULL;
   718 		return NULL;
   719 	}
   719 	}
   720 
   720 
       
   721 	// setting the server advertising on/off
       
   722 	if (strcmp(argv[1],"server_advertise") == 0) {
       
   723 		if (argc == 3) {
       
   724 			if (strcmp(argv[2], "on") == 0 || atoi(argv[2]) == 1)
       
   725 				_network_advertise = true;
       
   726 			else
       
   727 				_network_advertise = false;
       
   728 			IConsolePrintF(_iconsole_color_warning, "Server-advertise changed to '%s'", (_network_advertise)?"on":"off");
       
   729 		} else {
       
   730 			IConsolePrintF(_iconsole_color_default, "Current server-advertise is '%s'", (_network_advertise)?"on":"off");
       
   731 			IConsolePrint(_iconsole_color_warning, "Usage: set server_advertise on/off.");
       
   732 		}
       
   733 		return NULL;
       
   734 	}
       
   735 
   721 #endif /* ENABLE_NETWORK */
   736 #endif /* ENABLE_NETWORK */
   722 
   737 
   723 	// Patch-options
   738 	// Patch-options
   724 	if (strcmp(argv[1],"patch") == 0) {
   739 	if (strcmp(argv[1],"patch") == 0) {
   725 		if (_networking && !_network_server) {
   740 		if (_networking && !_network_server) {
   743 	IConsolePrint(_iconsole_color_error, " - company_pw \"<password>\"");
   758 	IConsolePrint(_iconsole_color_error, " - company_pw \"<password>\"");
   744 	IConsolePrint(_iconsole_color_error, " - name \"<playername>\"");
   759 	IConsolePrint(_iconsole_color_error, " - name \"<playername>\"");
   745 	IConsolePrint(_iconsole_color_error, " - servername \"<name>\"");
   760 	IConsolePrint(_iconsole_color_error, " - servername \"<name>\"");
   746 	IConsolePrint(_iconsole_color_error, " - server_port <port>");
   761 	IConsolePrint(_iconsole_color_error, " - server_port <port>");
   747 	IConsolePrint(_iconsole_color_error, " - server_bind_ip <ip>");
   762 	IConsolePrint(_iconsole_color_error, " - server_bind_ip <ip>");
       
   763 	IConsolePrint(_iconsole_color_error, " - server_advertise on/off");
   748 #endif /* ENABLE_NETWORK */
   764 #endif /* ENABLE_NETWORK */
   749 	IConsolePrint(_iconsole_color_error, " - patch <patch_name> [<value>]");
   765 	IConsolePrint(_iconsole_color_error, " - patch <patch_name> [<value>]");
   750 
   766 
   751 	return NULL;
   767 	return NULL;
   752 }
   768 }