core/CoreConfig.cpp
changeset 3685 baf5bdadd494
parent 3630 b72450a8be42
child 3691 09c4ca9c9712
     1.1 --- a/core/CoreConfig.cpp	Thu Nov 08 12:56:19 2012 -0500
     1.2 +++ b/core/CoreConfig.cpp	Thu Nov 15 17:49:13 2012 +0000
     1.3 @@ -193,17 +193,30 @@
     1.4  
     1.5  		if (res == ConfigResult_Reject)
     1.6  		{
     1.7 -			g_RootMenu.ConsolePrint("[SM] Could not set config option \"%s\" to \"%s\" (%s)", option, value, error);
     1.8 +			g_RootMenu.ConsolePrint("[SM] Could not set config option \"%s\" to \"%s\". (%s)", option, value, error);
     1.9  		} else if (res == ConfigResult_Ignore) {
    1.10  			g_RootMenu.ConsolePrint("[SM] No such config option \"%s\" exists.", option);
    1.11  		} else {
    1.12 -			g_RootMenu.ConsolePrint("Config option \"%s\" successfully set to \"%s.\"", option, value);
    1.13 +			g_RootMenu.ConsolePrint("[SM] Config option \"%s\" successfully set to \"%s\".", option, value);
    1.14  		}
    1.15  
    1.16  		return;
    1.17 +	} else if (argcount >= 3) {
    1.18 +		const char *option = command.Arg(2);
    1.19 +		
    1.20 +		const char *value = GetCoreConfigValue(option);
    1.21 +		
    1.22 +		if (value == NULL)
    1.23 +		{
    1.24 +			g_RootMenu.ConsolePrint("[SM] No such config option \"%s\" exists.", option);
    1.25 +		} else {
    1.26 +			g_RootMenu.ConsolePrint("[SM] Config option \"%s\" is set to \"%s\".", option, value);
    1.27 +		}
    1.28 +		
    1.29 +		return;
    1.30  	}
    1.31  
    1.32 -	g_RootMenu.ConsolePrint("[SM] Usage: sm config <option> <value>");
    1.33 +	g_RootMenu.ConsolePrint("[SM] Usage: sm config <option> [value]");
    1.34  }
    1.35  
    1.36  void CoreConfig::Initialize()