diff options
Diffstat (limited to 'cgi/weabot.py')
-rwxr-xr-x | cgi/weabot.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cgi/weabot.py b/cgi/weabot.py index 2ff7105..6d8b512 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -251,6 +251,11 @@ class weabot(object): OpenDb() board = setBoard(path_split[2]) caught = True + + # Redirect to ban page if user is banned + if addressIsBanned(self.environ['REMOTE_ADDR'], board["dir"], blind_only=True): + raise UserError, '<meta http-equiv="refresh" content="0; url=/cgi/banned/%s">' % board["dir"] + if len(path_split) > 4 and path_split[4] and board['board_type'] == '1': # try: self.output = dynamicRead( @@ -362,6 +367,11 @@ class weabot(object): # 4: post(s) OpenDb() board = setBoard(path_split[2]) + + # Redirect to ban page if user is banned + if addressIsBanned(self.environ['REMOTE_ADDR'], board["dir"], blind_only=True): + raise UserError, '<meta http-equiv="refresh" content="0; url=/cgi/banned/%s">' % board["dir"] + self.output = dynamicRead( int(path_split[3]), path_split[4]) elif path_split[1] == "preview": @@ -429,7 +439,6 @@ class weabot(object): # Redirect to ban page if user is banned if addressIsBanned(ip, board["dir"]): - #raise UserError, 'Tu host está en la lista negra.' raise UserError, '<meta http-equiv="refresh" content="0; url=/cgi/banned/%s">' % board["dir"] # Disallow posting if the site OR board is in maintenance |