mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 04:23:45 +01:00
convert time str to float before comparing to time
This commit is contained in:
2
main.py
2
main.py
@@ -59,7 +59,7 @@ def check_grass_touching_bans():
|
|||||||
|
|
||||||
cur.execute("SELECT username, last_grass_touch_time FROM Users")
|
cur.execute("SELECT username, last_grass_touch_time FROM Users")
|
||||||
for user in cur.fetchall():
|
for user in cur.fetchall():
|
||||||
if time.time() - user[1] >= (24 * 3600):
|
if time.time() - float(user[1]) >= (24 * 3600):
|
||||||
cur.execute("UPDATE users SET banned = ? WHERE username = ?", (True, user[0]))
|
cur.execute("UPDATE users SET banned = ? WHERE username = ?", (True, user[0]))
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user