From b3bfa8e620e2ca375993807977e2c4e4b2a1ac52 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 8 Aug 2015 12:15:08 +0200 Subject: [PATCH] Supporto per in gioco --- royalbot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/royalbot.py b/royalbot.py index 3bd75a66..a3409805 100644 --- a/royalbot.py +++ b/royalbot.py @@ -117,6 +117,8 @@ while(True): if(steam['response']['players']): online = steam['response']['players'][0]['personastate'] name = steam['response']['players'][0]['personaname'] + if(steam['response']['players'][0]['gameextrainfo']): + ingame = steam['response']['players'][0]['gameextrainfo'] text = "" if(online == 0): text = unichr(9898) + " Offline" @@ -132,6 +134,9 @@ while(True): text = unichr(55357) + unichr(56629) + " Disponibile per scambiare" elif(online == 6): text = unichr(55357) + unichr(56629) + " Disponibile per giocare" - sendMessage(name + " e' " + text + ".", msg['chat']['id']) + if ingame: + sendMessage(name + " sta giocando a " + ingame + ".", msg['chat']['id']) + else: + sendMessage(name + " e' " + text + ".", msg['chat']['id']) else: sendMessage("Lo steamid non esiste!", msg['chat']['id']) \ No newline at end of file