diff options
Diffstat (limited to 'cgi')
-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 |