Update mctools.py
This commit is contained in:
parent
3d74b7781d
commit
c4e5e91c14
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ def mcstatus(inp, say=None):
|
||||||
except (http.URLError, http.HTTPError) as e:
|
except (http.URLError, http.HTTPError) as e:
|
||||||
return "Unable to get Minecraft server status: {}".format(e)
|
return "Unable to get Minecraft server status: {}".format(e)
|
||||||
|
|
||||||
# change the json from a list of dictionaies to a dictionary
|
# lets just reformat this data to get in a nice format
|
||||||
data = json.loads(request.replace("}", "").replace("{", "").replace("]", "}").replace("[", "{"))
|
data = json.loads(request.replace("}", "").replace("{", "").replace("]", "}").replace("[", "{"))
|
||||||
|
|
||||||
out = []
|
out = []
|
||||||
|
@ -139,4 +139,4 @@ def mcping(inp):
|
||||||
return "Error pinging %s, is it up? Double-check your address!" % inp
|
return "Error pinging %s, is it up? Double-check your address!" % inp
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return rdata
|
return rdata
|
||||||
|
|
Reference in a new issue