Commit fcceaf1a authored by Florestan Biaux's avatar Florestan Biaux 💬
Browse files

correction affichage stats

parent 805f0b5d
......@@ -2,20 +2,20 @@ import decode
def counttalk(usertab, data):
tmp = ""
print(len(usertab))
print("\n")
for i in range(len(usertab)):
tmp = tmp + "0 "
tmp = tmp.split()
counttalk = [usertab, tmp]
messages = data["messages"]
cpt = 0
for msg in messages:
for i in range(len(counttalk[0])):
if decode.string_decode(msg["sender_name"]) == counttalk[0][i]:
counttalk[1][i] = int(counttalk[1][i])+1
cpt += 1
print("Messages envoyés : " + str(cpt) + " messages\n")
return counttalk
def printtab(tab):
for i in range(len(tab[0])):
print(str(tab[0][i]) + " : " + str(tab[1][i]) + " messages")
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