]> git.pond.sub.org Git - empserver/commitdiff
Replace econfig key lost_items_timeout by lost_keep_hours
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 10 Sep 2008 11:23:46 +0000 (07:23 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 12 Sep 2008 22:05:58 +0000 (18:05 -0400)
include/econfig-spec.h
src/lib/global/constants.c
src/server/lostitem.c

index 9a1305c625d816f2c3226f108082787b5fe74eef..565fa68759c1cd7e10c3f6b5e63f4afde73fc5d5 100644 (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)
index b42db33070b99b394729e0a38ceaf314cba23924..e86aa275209e30bf6bf29616bce276925732c76e 100644 (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? */
 
index b3667cc3f77b6eaa85da5cdac17b2c7409fd4819..42cc480829de1cb52cde5d13b69e1539792d493f 100644 (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);