This commit is contained in:
Luke Rogers 2014-02-16 17:50:50 +13:00
parent 92796a218f
commit 281a77c67c
1 changed files with 3 additions and 1 deletions

View File

@ -83,7 +83,9 @@ def mcping_modern(host, port):
max_players = data["players"]["max"]
online = data["players"]["online"]
except Exception as e:
return "Invalid data: {}; error: {}".format(data, e)
from pprint import pprint
pprint(data)
return "Invalid data - check console ({})".format(e)
return mc_color_format(u"{}\x0f - {}\x0f - {}/{} players.".format(desc, version, online,
max_players)).replace("\n", u"\x0f - ")