~sirn/fanboi2

ref: 98796226802a26b82c888365ad5b9cd331006792 fanboi2/fanboi2/models/rule.py -rw-r--r-- 1.3 KiB
Allow rule override to be scoped.
Fix a bug where rules are not properly returned for single IP.

Since the `ip_address >> operator` only works for IP classes.
In order to compare both classes and single IP, ``>>=`` operator
should be used instead.
Add rules system for evaluating rules based on IP address.

The rules system currently support two type of rules:

* Ban — disallow matched IP address to post in a board.
* Override — override board status for a certain IP address.

Each rule may be trigger on/off and may specify active period.