1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Sistemata la verifica del diario ryg

This commit is contained in:
Steffo 2016-03-07 12:37:55 +01:00
parent a74ac32894
commit 6eab9eb0e0

2
bot.py
View file

@ -556,7 +556,7 @@ while True:
print("@" + username + ": /diario ") print("@" + username + ": /diario ")
cmd = text.split(" ", 1) cmd = text.split(" ", 1)
if len(cmd) > 1: if len(cmd) > 1:
if cmd[1] in string.printable: if cmd[1].isprintable():
cmd[1] = cmd[1].replace("\n", " ") cmd[1] = cmd[1].replace("\n", " ")
diario = filemanager.readfile("diario.txt") diario = filemanager.readfile("diario.txt")
diario += str(int(time.time())) + "|" + cmd[1] + "\n" diario += str(int(time.time())) + "|" + cmd[1] + "\n"