/f config [setting] [value] command now accepts setting names which are inside quotation marks, to prevent confusion since they're also in quotation marks in conf.json

This commit is contained in:
Brettflan 2011-08-04 02:27:58 -05:00
parent e6ac1c0f98
commit 523d3216c5

View File

@ -51,7 +51,11 @@ public class FCommandConfig extends FBaseCommand {
} }
} }
String fieldName = properFieldNames.get(parameters.get(0).toLowerCase()); String field = parameters.get(0).toLowerCase();
if (field.startsWith("\"") && field.endsWith("\"")) {
field = field.substring(1, field.length() - 1);
}
String fieldName = properFieldNames.get(field);
if (fieldName == null || fieldName.isEmpty()) { if (fieldName == null || fieldName.isEmpty()) {
sendMessage("No configuration setting \""+parameters.get(0)+"\" exists."); sendMessage("No configuration setting \""+parameters.get(0)+"\" exists.");