def _fncChatBotAlly_cmdWhoPlays(self, m):
self.log("+", "\t\tReceive command !who_plays")
table = self.db['ranks'].table('server_'+str(self.account.account['serveur']))
# scan_date = table.get(where('id'), len(table))
# scan_date = scan_date['scan_date']
ranks_old = table.all()
ranks_now = self.account.getRanking()
self.log("?", "\t\tSearching for actives users..")
rapport = "Active players for last 5 days :\n\n"
count = 0
for rn in ranks_now:
for ro in ranks_old:
if rn['user'] == ro['user']:
if (ro['points'] - rn['points']) != 0:
count = count +1
rapport = rapport + "- @" + rn['user'] + " ("+str((rn['points'] - ro['points']))+" pts)\n"
if count >= 7:
count = 0
self.account.rSendMessageToAlliance(rapport)
rapport = ""
break
rapport = rapport + "OVER !"
self.account.rSendMessageToAlliance(rapport)
评论列表
文章目录