diff options
Diffstat (limited to 'cgi/weabot.py')
-rwxr-xr-x | cgi/weabot.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/cgi/weabot.py b/cgi/weabot.py index a54fd2b..194339f 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -405,8 +405,6 @@ class weabot(object): if hostIsBanned(ip): raise UserError, "Sufijo de host en lista negra." - if addressIsTor(ip): - raise UserError, "Proxy prohibido." # open database OpenDb() @@ -414,9 +412,9 @@ class weabot(object): # set the board board = setBoard(boarddir) - if board["dir"] not in ["world"]: - if addressIsProxy(ip) or addressIsBannedCountry(ip) or not addressIsES(ip): - raise UserError, "Proxy prohibido en esta sección." + if 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." # check length of fields if len(name) > 50: @@ -438,8 +436,7 @@ class weabot(object): t = time.time() # Delete expired bans - deletedBans = UpdateDb( - "DELETE FROM `bans` WHERE `until` != 0 AND `until` < " + str(timestamp())) + deletedBans = UpdateDb("DELETE FROM `bans` WHERE `until` != 0 AND `until` < " + str(timestamp())) if deletedBans > 0: regenerateAccess() @@ -449,8 +446,7 @@ class weabot(object): # Disallow posting if the site OR board is in maintenance if Settings.MAINTENANCE and board["dir"] != 'polka': - raise UserError, _( - "%s is currently under maintenance. We'll be back.") % Settings.SITE_TITLE + raise UserError, _("%s is currently under maintenance. We'll be back.") % Settings.SITE_TITLE if board["locked"] == '1': raise UserError, _("This board is closed. You can't post in it.") @@ -469,8 +465,7 @@ class weabot(object): post["parentid"] = parent_post['id'] post["bumped"] = parent_post['bumped'] if parent_post['locked'] == '1': - raise UserError, _( - "The thread is closed. You can't post in it.") + raise UserError, _("The thread is closed. You can't post in it.") # check if the user is flooding flood_check(t, post, board["id"]) |