From 0acb22e0a74080006e65671c01d5fc638453ebb5 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Fri, 28 Feb 2014 15:52:05 +1300 Subject: [PATCH] fixes --- plugins/minecraft_status.py | 26 +++++++++++++++++--------- plugins/minecraft_user.py | 2 +- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/plugins/minecraft_status.py b/plugins/minecraft_status.py index da5cd73..4ca67d3 100644 --- a/plugins/minecraft_status.py +++ b/plugins/minecraft_status.py @@ -18,19 +18,27 @@ def mcstatus(inp): out = [] # use a loop so we don't have to update it if they add more servers - yes = [] - no = [] + green = [] + yellow = [] + red = [] for server, status in data.items(): if status == "green": - yes.append(server) + green.append(server) + elif status == "yellow": + yellow.append(server) else: - no.append(server) - if yes: - out = "\x033\x02Online\x02\x0f: " + ", ".join(yes) - if no: + red.append(server) + + if green: + out = "\x033\x02Online\x02\x0f: " + ", ".join(green) + if yellow: out += " " - if no: - out += "\x034\x02Offline\x02\x0f: " + ", ".join(no) + if yellow: + out += "\x02Issues\x02: " + ", ".join(yellow) + if red: + out += " " + if red: + out += "\x034\x02Offline\x02\x0f: " + ", ".join(red) return "\x0f" + out.replace(".mojang.com", ".mj") \ .replace(".minecraft.net", ".mc") diff --git a/plugins/minecraft_user.py b/plugins/minecraft_user.py index ca8512c..bdcd488 100644 --- a/plugins/minecraft_user.py +++ b/plugins/minecraft_user.py @@ -39,7 +39,7 @@ def is_paid(name): @hook.command("haspaid") -@hook.command("mcstatus") +@hook.command("mcpaid") @hook.command def mcuser(inp): """mcpaid -- Gets information about the Minecraft user ."""