From 7ef25c75175383b1214673cddc1344d08953c629 Mon Sep 17 00:00:00 2001 From: neptune Date: Fri, 14 Aug 2020 11:22:08 -0400 Subject: Agregados bans de países --- cgi/framework.py | 4 ++-- cgi/weabot.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cgi') 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 -- cgit v1.2.1-18-gbd029