Replace econfig key lost_items_timeout by lost_keep_hours
This commit is contained in:
parent
0900cca4f5
commit
b72fd20674
3 changed files with 8 additions and 8 deletions
|
@ -389,8 +389,8 @@ EMPCFBOTH("anno_keep_days", anno_keep_days, int, NSC_INT, KM_INTERNAL,
|
|||
"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")
|
||||
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)
|
||||
|
|
|
@ -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? */
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue