summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/map/map.c b/src/map/map.c
index c65e49d21..ca2fd6565 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2856,24 +2856,17 @@ int map_config_read(char *cfgName) {
} else if(strcmpi(w1,"db_path") == 0) {
strncpy(db_path,w2,255);
} else if (strcmpi(w1, "console") == 0) {
- if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 ) {
- console = 1;
+ console = config_switch(w2);
+ if (console)
ShowNotice("Console Commands are enabled.\n");
- }
} else if (strcmpi(w1, "enable_spy") == 0) {
- if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
- enable_spy = 1;
- else
- enable_spy = 0;
- } else if (strcmpi(w1, "use_grf") == 0) { //[blackhole89]
- if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
- enable_grf = 1;
- else
- enable_grf = 0;
+ enable_spy = config_switch(w2);
+ } else if (strcmpi(w1, "use_grf") == 0) {
+ enable_grf = config_switch(w2);
} else if (strcmpi(w1, "import") == 0) {
map_config_read(w2);
} else
- ShowWarning("Unknown setting [%s] in file %s\n", w1, cfgName);
+ ShowWarning("Unknown setting '%s' in file %s\n", w1, cfgName);
}
}
fclose(fp);