diff options
author | neptune | 2020-08-14 11:22:08 -0400 |
---|---|---|
committer | neptune | 2020-08-14 11:22:08 -0400 |
commit | 7ef25c75175383b1214673cddc1344d08953c629 (patch) | |
tree | 16755f19a882499ac47cdd78980830956921d524 | |
parent | 94b29ae7a8b3b7d93af0089c1357cf575fd7e94d (diff) | |
download | weabot-7ef25c75175383b1214673cddc1344d08953c629.tar.gz weabot-7ef25c75175383b1214673cddc1344d08953c629.tar.xz weabot-7ef25c75175383b1214673cddc1344d08953c629.zip |
Agregados bans de países
-rw-r--r-- | cgi/framework.py | 4 | ||||
-rwxr-xr-x | cgi/weabot.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cgi/framework.py b/cgi/framework.py index 8c39f81..dfaff3d 100644 --- a/cgi/framework.py +++ b/cgi/framework.py @@ -97,8 +97,8 @@ def addressIsES(ip): return getCountry(ip) in ES -def addressIsUS(ip): - return getCountry(ip) == 'US' +def addressIsBannedCountry(ip): + return getCountry(ip) in Settings.BANNED_COUNTRIES def getCountry(ip): diff --git a/cgi/weabot.py b/cgi/weabot.py index f92e777..2ff7105 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -398,8 +398,8 @@ class weabot(object): # set the board board = setBoard(boarddir) - if board["dir"] != ["anarkia"]: - if addressIsProxy(ip): + if board["dir"] not in ["world", "bai"]: + if addressIsProxy(ip) or addressIsBannedCountry(ip): raise UserError, "Proxy prohibido en esta sección." # check length of fields |