aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgi/framework.py4
-rwxr-xr-xcgi/weabot.py4
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