realize mcpaid was already in mctools.py, so remove it

This commit is contained in:
neersighted 2012-02-28 09:06:12 +08:00 committed by lukeroge
parent 9a06f291d2
commit 0fdf370733
2 changed files with 4 additions and 11 deletions

View file

@ -1,7 +0,0 @@
from util import hook, http
@hook.command
def mcpaid(inp):
".mcpaid <username> -- checks if minecraft <username> has paid for the game"
return " ".join([x for x in http.get("http://www.minecraft.net/haspaid.jsp", user=inp).splitlines() if x])

View file

@ -3,7 +3,7 @@ import string
@hook.command(autohelp=False)
def mcstatus(inp, bot=None):
".mcstatus - Attempts to log in to minecraft"
".mcstatus -- Attempts to log in to minecraft"
username = bot.config.get("api_keys", {}).get("mc_user", None)
password = bot.config.get("api_keys", {}).get("mc_pass", None)
if password is None:
@ -17,7 +17,7 @@ def mcstatus(inp, bot=None):
@hook.command
def mclogin(inp, say=None):
".mclogin <username> <password> - Attempts to log in to minecraft using the provided username and password, this is NOT logged."
".mclogin <username> <password> -- Attempts to log in to minecraft using the provided username and password, this is NOT logged."
inp = inp.split(" ")
username = inp[0]
password = inp[1]
@ -29,8 +29,8 @@ def mclogin(inp, say=None):
return "I couldn't log in using " + username + ", either the password is wrong or minecraft login servers are down D:"
@hook.command
def haspaid(inp):
".haspaid <username> - Checks if a user has a premium Minecraft account"
def mcpaid(inp):
".mcpaid <username> -- Checks if a user has a premium Minecraft account"
login = http.get("http://www.minecraft.net/haspaid.jsp?user=" + inp)
if "true" in login:
return "The account \'" + inp + "\' is a premium Minecraft account! :D"