From 5a64ce49832f27e3974261cde3b1fcf7c2a5405a Mon Sep 17 00:00:00 2001 From: blha303 Date: Thu, 4 Apr 2013 22:35:34 +0800 Subject: [PATCH 1/3] Updating .mcstatus to show correct colors. --- plugins/mctools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mctools.py b/plugins/mctools.py index bfcd811..4d10039 100755 --- a/plugins/mctools.py +++ b/plugins/mctools.py @@ -73,12 +73,13 @@ def mcstatus(inp, say=None): data = json.loads(request.replace("}", "").replace("{", "").replace("]", "}").replace("[", "{")) out = [] + out.append("\x039") # use a loop so we don't have to update it if they add more servers for server, status in data.items(): if status == "green": - out.append("{} is \x033\x02online\x02\x03".format(server)) + out.append("{} is \x033\x02online\x02\x039".format(server)) else: - out.append("{} is \x034\x02offline\x02\x03".format(server)) + out.append("{} is \x034\x02offline\x02\x039".format(server)) return ", ".join(out) + "." From dce3c35424514c1a9435afcc645f10e2b142e2ae Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Thu, 4 Apr 2013 22:50:35 +0800 Subject: [PATCH 2/3] Fixed colors on .mcstatus --- plugins/mctools.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/mctools.py b/plugins/mctools.py index 4d10039..0c1d464 100755 --- a/plugins/mctools.py +++ b/plugins/mctools.py @@ -73,15 +73,14 @@ def mcstatus(inp, say=None): data = json.loads(request.replace("}", "").replace("{", "").replace("]", "}").replace("[", "{")) out = [] - out.append("\x039") # use a loop so we don't have to update it if they add more servers for server, status in data.items(): if status == "green": - out.append("{} is \x033\x02online\x02\x039".format(server)) + out.append("{} is \x033\x02online\x02\x033".format(server)) else: - out.append("{} is \x034\x02offline\x02\x039".format(server)) + out.append("{} is \x034\x02offline\x02\x033".format(server)) - return ", ".join(out) + "." + return "\x033" + ", ".join(out) + "." @hook.command("haspaid") From 8ac4450ff7dd056b0b7d99d8649a3cc2faa0cb88 Mon Sep 17 00:00:00 2001 From: blha303 Date: Fri, 5 Apr 2013 03:59:49 +0800 Subject: [PATCH 3/3] Removed colors on the non-status text --- plugins/mctools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/mctools.py b/plugins/mctools.py index 0c1d464..d866988 100755 --- a/plugins/mctools.py +++ b/plugins/mctools.py @@ -76,11 +76,11 @@ def mcstatus(inp, say=None): # use a loop so we don't have to update it if they add more servers for server, status in data.items(): if status == "green": - out.append("{} is \x033\x02online\x02\x033".format(server)) + out.append("{} is \x033\x02online\x02\x0f".format(server)) else: - out.append("{} is \x034\x02offline\x02\x033".format(server)) + out.append("{} is \x034\x02offline\x02\x0f".format(server)) - return "\x033" + ", ".join(out) + "." + return "\x0f" + ", ".join(out) + "." @hook.command("haspaid")