erocs/JukeAlert — pull request #71 by MCL0stman (2013-08-30 08:21:59+00:00)
Title: Implementation juke alert culling based on owner last visit date.

Added new config.yml settings:
daysFromLastAdminVisitForLoggedSnitchCulling - default value 0
daysFromLastAdminVisitForNonLoggedSnitchCulling - default value 0

When either of these values are non-zero, it will allow for culling on server-start of the snitches that have not been visited in X days. Implemented with a column on the snitch record for holding last visit.

Added new command /jalist to support users. This will list all snitches that they are either moderator or owner over and the locations of these snitches, hours until it is culled, and the number of events this snitch has logged (for snitches that should log events). The "events logged" is just interesting metadata to display to the user. Data is paged and default sort is based on the amount of time until the snitch is purged. For snitches that are not purged, it is sorted based on the last visit date.

Tests performed:
- When both config values are zero, snitches are not culled.
- When people not on the moderator/owner list visit them, the last visit date is not updated.
- When people not on the moderator/owner list for a juke types /jalist, it does not show them other folks snitches.
- When logged snitch culling is enabled and non logged snitch culling is disabled, culling performs as expected.
- When non logged snitch culling is enabled and logged snitch culling is disabled, culling performs as expected.
- When both types of sntich culling is enabled, culling performs as expected.
- Snitches that have been purged are still reinforced and the item + reinforcement can still be obtained via ctb.
- The /jalist command responds with updated information within 1 sec of a moderator visiting a snitch.

Checkin was rebased on latest changes from the main branch.