version 1.64 | | version 1.65 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.64 2005/07/15 13:51:51 ryo_saeba Exp $"; | | * "$Id: init.c,v 1.65 2005/07/16 21:10:39 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) { | | } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) { |
settings.meta_on=FALSE; | | settings.meta_on=FALSE; |
} else { | | } else { |
LOG(llevError,"load_settings: Unkown value for metaserver_notification: %s\n", | | LOG(llevError,"load_settings: Unknown value for metaserver_notification: %s\n", |
cp); | | cp); |
} | | } |
} else if (!strcasecmp(buf,"metaserver_server")) { | | } else if (!strcasecmp(buf,"metaserver_server")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.not_permadeth=FALSE; | | settings.not_permadeth=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for not_permadeth" | | LOG(llevError, "load_settings: Unknown value for not_permadeth" |
": %s\n", cp); | | ": %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "resurrection")) { | | } else if (!strcasecmp(buf, "resurrection")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.resurrection=FALSE; | | settings.resurrection=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for resurrection" | | LOG(llevError, "load_settings: Unknown value for resurrection" |
": %s\n", cp); | | ": %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "set_title")) { | | } else if (!strcasecmp(buf, "set_title")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.set_title=FALSE; | | settings.set_title=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for set_title" | | LOG(llevError, "load_settings: Unknown value for set_title" |
": %s\n", cp); | | ": %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "search_items")) { | | } else if (!strcasecmp(buf, "search_items")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.search_items=FALSE; | | settings.search_items=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for search_items" | | LOG(llevError, "load_settings: Unknown value for search_items" |
": %s\n", cp); | | ": %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "spell_encumbrance")) { | | } else if (!strcasecmp(buf, "spell_encumbrance")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.spell_encumbrance=FALSE; | | settings.spell_encumbrance=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for " | | LOG(llevError, "load_settings: Unknown value for " |
"spell_encumbrance: %s\n", cp); | | "spell_encumbrance: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "spell_failure_effects")) { | | } else if (!strcasecmp(buf, "spell_failure_effects")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.spell_failure_effects=FALSE; | | settings.spell_failure_effects=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"spell_failure_effects: %s\n", cp); | | "spell_failure_effects: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "casting_time")) { | | } else if (!strcasecmp(buf, "casting_time")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.casting_time=FALSE; | | settings.casting_time=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"casting_time: %s\n", cp); | | "casting_time: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "real_wiz")) { | | } else if (!strcasecmp(buf, "real_wiz")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.real_wiz=FALSE; | | settings.real_wiz=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"real_wiz: %s\n", cp); | | "real_wiz: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "recycle_tmp_maps")) { | | } else if (!strcasecmp(buf, "recycle_tmp_maps")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.recycle_tmp_maps=FALSE; | | settings.recycle_tmp_maps=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"recycle_tmp_maps: %s\n", cp); | | "recycle_tmp_maps: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "explore_mode")) { | | } else if (!strcasecmp(buf, "explore_mode")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.explore_mode=FALSE; | | settings.explore_mode=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"explore_mode: %s\n", cp); | | "explore_mode: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf,"who_format")) { | | } else if (!strcasecmp(buf,"who_format")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.spellpoint_level_depend=FALSE; | | settings.spellpoint_level_depend=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"spellpoint_level_depend: %s\n", cp); | | "spellpoint_level_depend: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "stat_loss_on_death")) { | | } else if (!strcasecmp(buf, "stat_loss_on_death")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.stat_loss_on_death=FALSE; | | settings.stat_loss_on_death=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"stat_loss_on_death: %s\n", cp); | | "stat_loss_on_death: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "use_permanent_experience")) { | | } else if (!strcasecmp(buf, "use_permanent_experience")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.use_permanent_experience=FALSE; | | settings.use_permanent_experience=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"use_permanent_experience: %s\n", cp); | | "use_permanent_experience: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf, "balanced_stat_loss")) { | | } else if (!strcasecmp(buf, "balanced_stat_loss")) { |
| | |
} else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { | | } else if (!strcasecmp(cp, "off") || !strcasecmp(cp, "false")) { |
settings.balanced_stat_loss=FALSE; | | settings.balanced_stat_loss=FALSE; |
} else { | | } else { |
LOG(llevError, "load_settings: Unkown value for" | | LOG(llevError, "load_settings: Unknown value for " |
"balanced_stat_loss: %s\n", cp); | | "balanced_stat_loss: %s\n", cp); |
} | | } |
} else if (!strcasecmp(buf,"simple_exp")) { | | } else if (!strcasecmp(buf,"simple_exp")) { |
| | |
} else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) { | | } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) { |
settings.simple_exp=FALSE; | | settings.simple_exp=FALSE; |
} else { | | } else { |
LOG(llevError,"load_settings: Unkown value for simple_exp: %s\n", | | LOG(llevError,"load_settings: Unknown value for simple_exp: %s\n", |
cp); | | cp); |
} | | } |
} else if (!strcasecmp(buf, "item_power_factor")) { | | } else if (!strcasecmp(buf, "item_power_factor")) { |
float tmp = atof(cp); | | float tmp = atof(cp); |
if (tmp < 0) | | if (tmp < 0) |
LOG(llevError, "load_settings: item_power_factor must be a postive number (%f < 0)\n", | | LOG(llevError, "load_settings: item_power_factor must be a positive number (%f < 0)\n", |
tmp); | | tmp); |
else | | else |
settings.item_power_factor = tmp; | | settings.item_power_factor = tmp; |
| | |
printf(" -tmpdir Sets the directory for temporary files (mostly maps.)\n"); | | printf(" -tmpdir Sets the directory for temporary files (mostly maps.)\n"); |
printf(" -m Lists out suggested experience for all monsters.\n"); | | printf(" -m Lists out suggested experience for all monsters.\n"); |
printf(" -m2 Dumps out abilities.\n"); | | printf(" -m2 Dumps out abilities.\n"); |
printf(" -m3 Dumps out artifactt information.\n"); | | printf(" -m3 Dumps out artifact information.\n"); |
printf(" -m4 Dumps out spell information.\n"); | | printf(" -m4 Dumps out spell information.\n"); |
printf(" -m5 Dumps out skill information.\n"); | | printf(" -m5 Dumps out skill information.\n"); |
printf(" -m6 Dumps out race information.\n"); | | printf(" -m6 Dumps out race information.\n"); |
| | |
exit(0); | | exit(0); |
#else | | #else |
execl("/bin/uname", "uname", "-a", NULL); | | execl("/bin/uname", "uname", "-a", NULL); |
LOG(llevError, "Oops, should't have gotten here.\n"); | | LOG(llevError, "Oops, shouldn't have gotten here.\n"); |
perror("execl"); | | perror("execl"); |
exit(-1); | | exit(-1); |
#endif | | #endif |