Commit 31d7345c authored by Mindiell's avatar Mindiell

Added known users in order to reduce spam

parent 08e4ec67
...@@ -519,6 +519,7 @@ class Wantzel(object): ...@@ -519,6 +519,7 @@ class Wantzel(object):
connection.execute("UPDATE rpator SET score=score+1 WHERE name='%s';" % user) connection.execute("UPDATE rpator SET score=score+1 WHERE name='%s';" % user)
else: else:
connection.execute("INSERT INTO rpator (name, score) VALUES ('%s', 1);" % user) connection.execute("INSERT INTO rpator (name, score) VALUES ('%s', 1);" % user)
connection.commit()
# Ok, we got all information we need, let's answer now ! # Ok, we got all information we need, let's answer now !
if master_user: if master_user:
...@@ -554,6 +555,7 @@ class Wantzel(object): ...@@ -554,6 +555,7 @@ class Wantzel(object):
connection = sqlite3.connect(config.sqlite_db) connection = sqlite3.connect(config.sqlite_db)
connection.execute("UPDATE rpator SET score=score-1 WHERE user='%s'" % user) connection.execute("UPDATE rpator SET score=score-1 WHERE user='%s'" % user)
connection.execute("DELETE FROM rpator WHERE score<1") connection.execute("DELETE FROM rpator WHERE score<1")
connection.commit()
# Date of next cleaning # Date of next cleaning
next_week = time.localtime(time.mktime(time.localtime())+(MASTER_CLEANING*86400)) next_week = time.localtime(time.mktime(time.localtime())+(MASTER_CLEANING*86400))
self.next_cleaning = time.strptime("%s-%s-%s %s" % ( self.next_cleaning = time.strptime("%s-%s-%s %s" % (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment