Replace econfig key lost_items_timeout by lost_keep_hours

This commit is contained in:
Markus Armbruster 2008-09-10 07:23:46 -04:00
parent 0900cca4f5
commit b72fd20674
3 changed files with 8 additions and 8 deletions

View file

@ -384,13 +384,13 @@ EMPCFBOTH("trade_ally_cut", trade_ally_cut, float, NSC_FLOAT, 0,
EMPCF_COMMENT("\n\n### Miscellaneous")
EMPCFBOTH("disabled_commands", disabled_commands, char *, NSC_STRING, KM_INTERNAL,
"Disabled commands, separated by space")
"Disabled commands, separated by space")
EMPCFBOTH("anno_keep_days", anno_keep_days, int, NSC_INT, KM_INTERNAL,
"How long until announcements expire (<0 means never)")
"How long until announcements expire (<0 means never)")
EMPCFBOTH("news_keep_days", news_keep_days, int, NSC_INT, KM_INTERNAL,
"How long until news expire")
EMPCFBOTH("lost_items_timeout", lost_items_timeout, int, NSC_INT, KM_INTERNAL,
"Seconds before a lost item is timed out of the database")
"How long until news expire")
EMPCFBOTH("lost_keep_hours", lost_keep_hours, int, NSC_INT, KM_INTERNAL,
"How long until lost items expire")
/* Sentinel */
EMPCFONLYC(NULL, emp_config_dummy, NULL, NSC_NOTYPE, 0, NULL)

View file

@ -85,8 +85,8 @@ int sect_mob_neg_factor = 2; /* ETU/neg_factor = negative amount of mobility
a sector has after being taken */
int anno_keep_days = 7; /* How long until annos expire (<0 never) */
int news_keep_days = 10; /* How long until news expire (<0 never) */
int lost_items_timeout = 172800; /* How long before removing from database */
int news_keep_days = 10; /* How long until news expire */
int lost_keep_hours = 48; /* How long until lost items expire */
double combat_mob = 5.0; /* how much mob do units spend for combat? */

View file

@ -55,7 +55,7 @@ delete_lostitems(void *unused)
for (n = 0; getlost(n, &lost); n++) {
if (!lost.lost_owner)
continue;
if (lost.lost_timestamp > (now - lost_items_timeout))
if (lost.lost_timestamp > (now - hours(lost_keep_hours)))
continue;
lost.lost_owner = 0;
putlost(n, &lost);