Prior to this comment, the every-1d cron.py command was broken due
to lack of proper stats import. However, while refactoring this, it
was convenient to move other recurring tasks that had been stuffed in
odd places--not least `stats(...)`--into the new cron system. This
entailed a number of refactorings of other things.
1. Move stats(...) from static.py to helpers/stats.py.
2. Move hole inactivity purge task from stats(...) to routes/subs.py.
3. Move bot award timer checks from stats(...) to helpers/awards.py.
4. Unify award timer logic formerly in routes/front.py into the new
helpers/awards.py.
The reddit mentions system contained much duplicated code and was
grafted onto the post thumbnail pipeline to achieve semi-regular
invocation. Instead, we now run it through the new cron system,
and the duplicate code has been refactored out.
This is a kludge solution that sticks special case logic in places
it shouldn't be. However, community management demands necessitate it
quickly. Of the three ways to change a flair (customtitle), this
prevents using flairlocks and admin flair editing on the user with
CARP_ID. Only the user himself may change his flair through settings.
Assetcache: now supports js/userpage.js & js/userpage_v.js.
The three userpage*.html templates now implement it.
Revising gift messages 16587cdf7cf5:
- routes/users.py: Deduplicate code, more descriptive var name.
- templates/userpage.html: Move post-tax gift line below reasons
box. Ultimately just an aesthetic change.
Hopefully finishes the RSS fix saga. This one done in-house rather
than by patch, as 5d6d4f9ca0 and 29fdc774a9 had been.
This final change ensures the <updated> tag is always used, even
for un-edited posts. This appears to pass the W3C Validator using
local test data. We shall see how it behaves with data on prod.
Users now have a toggleable can_gamble setting which disables their
ability to use all chance-based gains on the site: viz. slots,
blackjack, the lottery, and treasure chests.
This only applies on invocation of commands that start gambling
games, so it should cause no bugs when toggled with e.g. active
blackjack games.
This was added for the benefit of users with actual problems with
gambling, be they past addiction or religious conviction. All future
gambling features are humbly requested to respect it.