new configuration key. Closes #780425.
(delete_old_announcements): Do nothing when anno_keep_days is
negative.
"Bonus your ally gets for you cashing in with them")
EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Misc.")
+EMPCFBOTH("anno_keep_days", anno_keep_days, int, intset, 7,
+ "How long until announcements expire (<0 means never)")
EMPCFBOTH("fuel_mult", fuel_mult, int, intset, 0,
"Multiplier for fuel to mobility calculation")
EMPCFBOTH("lost_items_timeout", lost_items_timeout, int, intset, 0,
#define ATTRIBUTE(attrs)
#endif
-#define ANNO_KEEP_DAYS 7 /* Keep announcements around for this many days */
/* This uses a lot of thread stack with some versions of GNU libc,
which can lead to nasty heap smashes (observed with 2.2.93).
Disabled for now, until we readjust thread stack sizes. */
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 lost_items_timeout = 172800; /* How long before removing from database */
double combat_mob = 5.0; /* how much mob do units spend for combat? */
char tmp_filename[1024];
int copy_file;
+ if (anno_keep_days < 0)
+ return;
+
time(&now);
- old = now - days(ANNO_KEEP_DAYS);
+ old = now - days(anno_keep_days);
logerror("Deleting annos older than %s", ctime(&old));
if ((annfp = fopen(annfil, "rb")) == NULL) {