Void User 2 years ago
parent 50724a3f70
commit 9f97755888

@ -21,11 +21,12 @@ from time import sleep
read() read()
needsleep = 0 needsleep = 0
ttime = 0
while True: while True:
if needsleep == 30: if needsleep == 30:
needsleep = 0 needsleep = 0
sleep(30) sleep(30)
db[i[0]] = db[i[0]] + 29 ttime = 29
else: else:
sleep(1) sleep(1)
needsleep += 1 needsleep += 1
@ -37,11 +38,12 @@ while True:
for i in stats['players']['sample']: for i in stats['players']['sample']:
#Add in db if not in db #Add in db if not in db
if i[0] not in db: if i[0] not in db:
db[i[0]] = 1 db[i[0]] = 1 + ttime
write() write()
else: else:
db[i[0]] = db[i[0]] + 1 db[i[0]] = db[i[0]] + 1 + ttime
write() write()
ttime = 0
except Exception as e: except Exception as e:
print(e) print(e)

Loading…
Cancel
Save