version 1.20 | | version 1.21 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.20 2001/12/18 08:58:03 garbled Exp $"; | | * "$Id: init.c,v 1.21 2001/12/19 10:07:41 garbled Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
else settings.meta_port = port; | | else settings.meta_port = port; |
} else if (!strcasecmp(buf,"metaserver_comment")) { | | } else if (!strcasecmp(buf,"metaserver_comment")) { |
strcpy(settings.meta_comment, cp); | | strcpy(settings.meta_comment, cp); |
| | } else if (!strcasecmp(buf, "worldmapstartx")) { |
| | int size = atoi(cp); |
| | |
| | if (size < 0) |
| | LOG(llevError, "load_settings: worldmapstartx must be at least" |
| | "0, %d is invalid\n", size); |
| | else |
| | settings.worldmapstartx = size; |
| | } else if (!strcasecmp(buf, "worldmapstarty")) { |
| | int size = atoi(cp); |
| | |
| | if (size < 0) |
| | LOG(llevError, "load_settings: worldmapstarty must be at least" |
| | "0, %d is invalid\n", size); |
| | else |
| | settings.worldmapstarty = size; |
| | } else if (!strcasecmp(buf, "worldmaptilesx")) { |
| | int size = atoi(cp); |
| | |
| | if (size < 1) |
| | LOG(llevError, "load_settings: worldmaptilesx must be greater" |
| | "than 1, %d is invalid\n", size); |
| | else |
| | settings.worldmaptilesx = size; |
| | } else if (!strcasecmp(buf, "worldmaptilesy")) { |
| | int size = atoi(cp); |
| | |
| | if (size < 1) |
| | LOG(llevError, "load_settings: worldmaptilesy must be greater" |
| | "than 1, %d is invalid\n", size); |
| | else |
| | settings.worldmaptilesy = size; |
| | } else if (!strcasecmp(buf, "worldmaptilesizex")) { |
| | int size = atoi(cp); |
| | |
| | if (size < 1) |
| | LOG(llevError, "load_settings: worldmaptilesizex must be" |
| | "greater than 1, %d is invalid\n", size); |
| | else |
| | settings.worldmaptilesizex = size; |
| | } else if (!strcasecmp(buf, "worldmaptilesizey")) { |
| | int size = atoi(cp); |
| | |
| | if (size < 1) |
| | LOG(llevError, "load_settings: worldmaptilesizey must be" |
| | "greater than 1, %d is invalid\n", size); |
| | else |
| | settings.worldmaptilesizey = size; |
| | } else if (!strcasecmp(buf, "dynamiclevel")) { |
| | int lev = atoi(cp); |
| | |
| | if (lev < 0) |
| | LOG(llevError, "load_settings: dynamiclevel must be" |
| | "at least 0, %d is invalid\n", lev); |
| | else |
| | settings.dynamiclevel = lev; |
} else { | | } else { |
LOG(llevError,"Unknown value in settings file: %s\n", buf); | | LOG(llevError,"Unknown value in settings file: %s\n", buf); |
} | | } |