Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
the code that powers
Python JavaScript HTML CSS Shell C Other
branch: master

AutoMod: fix bugs in check_account_thresholds()

This is a minor rearrangement of some of the logic in
check_account_threshold(), which fixes at least 3 bugs:

1. Banned accounts were returning False from this function, even if
   there weren't actually any threshold checks to be performed. This
   means that any sort of rule involving an "author:" check could never
   be satisfied by a banned account, since this function would always be
   called and return False, regardless of what was actually in the
   author check.
2. Threshold checks with a value of exactly 0 would have never been
   checked, since that would have been evaluated as False and caused the
   check to be skipped inside the loop. These checks are rare since
   they're for equality instead of the much more common
   less-than/greater-than checks, but still could exist. So for example,
   a rule that was trying to check for brand new users by looking for
   "comment_karma: 0" would not have worked correctly.
3. Inadvertently setting satisfy_any_threshold to True without actually
   defining any threshold checks would have caused this function to
   always return False because reaching the bottom of the function
   returns the inverse of satisfy_any_threshold.
latest commit fe98410cc8
@Deimos Deimos authored



This is the primary codebase that powers

For notices about major changes and general discussion of reddit development, subscribe to the /r/redditdev and /r/changelog subreddits.

You can also chat with us via IRC in #reddit-dev on FreeNode.


To set up your own instance of reddit to develop with, we have a handy install script for Ubuntu that will automatically install and configure most of the stack.

Alternatively, refer to our Install Guide for instructions on setting up reddit from scratch. Many frequently asked questions regarding local reddit installs are covered in our FAQ.


To learn more about reddit's API, check out our automated API documentation and the API wiki page. Please use a unique User-Agent string and take care to abide by our API rules.

Happy hacking!

Issues and Contribution Guidelines

Thanks for wanting to help make reddit better! First things first, though: github issues is only for confirmed, active bugs. Please submit ideas to /r/ideasfortheadmins.

Please read more on contributions in

Something went wrong with that request. Please try again.