From 394a07235d428348350d0edd9397e85f0ac746b9 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Thu, 6 Sep 2012 07:28:27 +1200 Subject: [PATCH] mcstatus now checks the minecraft skin servers --- plugins/mctools.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/mctools.py b/plugins/mctools.py index 87412f7..11ca952 100755 --- a/plugins/mctools.py +++ b/plugins/mctools.py @@ -54,6 +54,13 @@ def mcstatus(inp, say=None): # change the json from a list of dictionaies to a dictionary data = json.loads(request.replace("}", "").replace("{", "").replace("]", "}").replace("[", "{")) + # check if skins are online + try: + request = http.get("http://s3.amazonaws.com/MinecraftSkins/Shnaw.png") + data["minecraft skin server"] = "green" + except (http.URLError, http.HTTPError) as e: + data["minecraft skin server"] = "red" + out = [] # use a loop so we don't have to update it if they add more servers for server, status in data.items(): @@ -68,8 +75,7 @@ def mcstatus(inp, say=None): @hook.command("haspaid") @hook.command def mcpaid(inp): - "mcpaid -- Checks if has a" \ - " premium Minecraft account." + "mcpaid -- Checks if has a premium Minecraft account." login = http.get("http://www.minecraft.net/haspaid.jsp", user=inp) if "true" in login: