diff --git a/Bantracker/bans.cgi b/Bantracker/bans.cgi index 8739f50..907dfe0 100755 --- a/Bantracker/bans.cgi +++ b/Bantracker/bans.cgi @@ -13,6 +13,7 @@ # ### +import os import sys import time # This needs to be set to the location of the commoncgi.py file @@ -20,8 +21,9 @@ sys.path.append('/var/www/bot') from commoncgi import * ### Variables -db = '/home/bot/data/bans.db' +db = '/home/bot/data/bans.db' num_per_page = 100 +pagename = os.path.basename(sys.argv[0]) t1 = time.time() @@ -84,7 +86,7 @@ if form.has_key('comment') and form.has_key('comment_id') and user: con.commit() # Write the page -print '
' +print '' % pagename # Personal data print '
' @@ -112,7 +114,7 @@ tz = pytz.timezone(tz) # Search form print '' # Empty log div, will be filled with AJAX @@ -173,7 +175,7 @@ for h in [['Channel',0], ['Nick/Mask',1], ['Operator',2], ['Time',6]]: if v < 10: h[1] += 10 except: pass - print '%s' % (h[1],h[0]) + print '%s' % (pagename, h[1], h[0]) print 'Log' # Select and filter bans @@ -230,6 +232,7 @@ def getQueryTerm(query, term): return (query, ret) return (query, None) + bans = [] oper = chan = False @@ -328,9 +331,11 @@ for b in bans[start:end]: if user: print """Add comment""" % b[6] print """