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
|
@ -384,13 +384,13 @@ EMPCFBOTH("trade_ally_cut", trade_ally_cut, float, NSC_FLOAT, 0,
|
||||||
|
|
||||||
EMPCF_COMMENT("\n\n### Miscellaneous")
|
EMPCF_COMMENT("\n\n### Miscellaneous")
|
||||||
EMPCFBOTH("disabled_commands", disabled_commands, char *, NSC_STRING, KM_INTERNAL,
|
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,
|
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,
|
EMPCFBOTH("news_keep_days", news_keep_days, int, NSC_INT, KM_INTERNAL,
|
||||||
"How long until news expire")
|
"How long until news expire")
|
||||||
EMPCFBOTH("lost_items_timeout", lost_items_timeout, int, NSC_INT, KM_INTERNAL,
|
EMPCFBOTH("lost_keep_hours", lost_keep_hours, int, NSC_INT, KM_INTERNAL,
|
||||||
"Seconds before a lost item is timed out of the database")
|
"How long until lost items expire")
|
||||||
|
|
||||||
/* Sentinel */
|
/* Sentinel */
|
||||||
EMPCFONLYC(NULL, emp_config_dummy, NULL, NSC_NOTYPE, 0, NULL)
|
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 */
|
a sector has after being taken */
|
||||||
|
|
||||||
int anno_keep_days = 7; /* How long until annos expire (<0 never) */
|
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 news_keep_days = 10; /* How long until news expire */
|
||||||
int lost_items_timeout = 172800; /* How long before removing from database */
|
int lost_keep_hours = 48; /* How long until lost items expire */
|
||||||
|
|
||||||
double combat_mob = 5.0; /* how much mob do units spend for combat? */
|
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++) {
|
for (n = 0; getlost(n, &lost); n++) {
|
||||||
if (!lost.lost_owner)
|
if (!lost.lost_owner)
|
||||||
continue;
|
continue;
|
||||||
if (lost.lost_timestamp > (now - lost_items_timeout))
|
if (lost.lost_timestamp > (now - hours(lost_keep_hours)))
|
||||||
continue;
|
continue;
|
||||||
lost.lost_owner = 0;
|
lost.lost_owner = 0;
|
||||||
putlost(n, &lost);
|
putlost(n, &lost);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue