diff options
author | David Härdeman <david@hardeman.nu> | 2020-07-12 22:30:22 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-07-12 22:30:22 +0200 |
commit | bbdd4abc9f787f057848a5b97656509b877793e0 (patch) | |
tree | f1daee6b9302e444ddd17a6d3986a407b35b4806 /shared | |
parent | 5c91d6294929b86105f16b96de5596a93be3ea68 (diff) |
Move more static strings to config.h
Diffstat (limited to 'shared')
-rw-r--r-- | shared/config-parser.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/shared/config-parser.c b/shared/config-parser.c index 8cb6dcd..00f9944 100644 --- a/shared/config-parser.c +++ b/shared/config-parser.c @@ -339,19 +339,19 @@ void sprop_parse(struct server_config *scfg, char *buf, const char *keyname; struct cfg_value value; - if (!config_parse_line("server.properties", &pos, sprop_key_map, - &key, &keyname, &value, false, lineno, - error)) + if (!config_parse_line(MC_SERVER_PROPERTIES, &pos, + sprop_key_map, &key, &keyname, &value, + false, lineno, error)) break; switch (key) { case SPROP_KEY_SERVER_PORT: debug(DBG_CFG, "found remote server port in " - "server.properties"); + MC_SERVER_PROPERTIES); if (!list_empty(&scfg->remotes)) { error("mc server address set both in %s and " - "server.properties", scfg->filename); + MC_SERVER_PROPERTIES, scfg->filename); break; } @@ -361,11 +361,11 @@ void sprop_parse(struct server_config *scfg, char *buf, case SPROP_KEY_RCON_PORT: debug(DBG_CFG, "found rcon port in " - "server.properties"); + MC_SERVER_PROPERTIES); if (!list_empty(&scfg->rcons)) { error("rcon address set both in %s and " - "server.properties", scfg->filename); + MC_SERVER_PROPERTIES, scfg->filename); break; } @@ -375,11 +375,11 @@ void sprop_parse(struct server_config *scfg, char *buf, case SPROP_KEY_RCON_PASSWORD: debug(DBG_CFG, "found rcon password in " - "server.properties"); + MC_SERVER_PROPERTIES); if (scfg->rcon_password) { error("rcon password set both in %s and " - "server.properties (%smatching)", + MC_SERVER_PROPERTIES " (%smatching)", scfg->filename, streq(scfg->rcon_password, value.str) ? "" : "not"); @@ -406,7 +406,7 @@ bool scfg_parse(struct server_config *scfg, char *buf, bool async, *lineno = 0; - if (!config_parse_header(SERVER_CFG_HEADER, &pos, lineno)) + if (!config_parse_header(SERVER_CONFIG_FILE_HEADER, &pos, lineno)) ERROR("missing/invalid header"); while (true) { |