aboutsummaryrefslogtreecommitdiff
path: root/cgi/weabot.py
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/weabot.py')
-rwxr-xr-xcgi/weabot.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cgi/weabot.py b/cgi/weabot.py
index e17a224..38efa7c 100755
--- a/cgi/weabot.py
+++ b/cgi/weabot.py
@@ -412,7 +412,7 @@ class weabot(object):
# set the board
board = setBoard(boarddir)
- if board["dir"] not in Settings.EXCLUDE_GLOBAL_BANS:
+ if Settings.PROXY_BAN and (board["dir"] not in Settings.EXCLUDE_GLOBAL_BANS):
if addressIsTor(ip) or addressIsProxy(ip) or addressIsBannedCountry(ip) or not addressIsES(ip):
raise UserError, "Proxy prohibido."
@@ -734,6 +734,9 @@ class weabot(object):
else:
host = '.'.join((hosts[-2], hosts[-1]))
host = '*.' + host
+ elif ':' in ip:
+ iprs = ip.split(':')
+ host = '%s:%s:%s:%s:*.*.*.*' % (iprs[0], iprs[1], iprs[2], iprs[3])
else:
iprs = ip.split('.')
host = '%s.%s.*.*' % (iprs[0], iprs[1])