Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
wantzel
Commits
31d7345c
Commit
31d7345c
authored
Oct 31, 2016
by
Mindiell
Browse files
Added known users in order to reduce spam
parent
08e4ec67
Changes
1
Hide whitespace changes
Inline
Side-by-side
wantzel.py
View file @
31d7345c
...
...
@@ -519,6 +519,7 @@ class Wantzel(object):
connection
.
execute
(
"UPDATE rpator SET score=score+1 WHERE name='%s';"
%
user
)
else
:
connection
.
execute
(
"INSERT INTO rpator (name, score) VALUES ('%s', 1);"
%
user
)
connection
.
commit
()
# Ok, we got all information we need, let's answer now !
if
master_user
:
...
...
@@ -554,6 +555,7 @@ class Wantzel(object):
connection
=
sqlite3
.
connect
(
config
.
sqlite_db
)
connection
.
execute
(
"UPDATE rpator SET score=score-1 WHERE user='%s'"
%
user
)
connection
.
execute
(
"DELETE FROM rpator WHERE score<1"
)
connection
.
commit
()
# Date of next cleaning
next_week
=
time
.
localtime
(
time
.
mktime
(
time
.
localtime
())
+
(
MASTER_CLEANING
*
86400
))
self
.
next_cleaning
=
time
.
strptime
(
"%s-%s-%s %s"
%
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment