realize mcpaid was already in mctools.py, so remove it
This commit is contained in:
parent
9a06f291d2
commit
0fdf370733
2 changed files with 4 additions and 11 deletions
|
@ -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])
|
|
|
@ -3,7 +3,7 @@ import string
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def mcstatus(inp, bot=None):
|
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)
|
username = bot.config.get("api_keys", {}).get("mc_user", None)
|
||||||
password = bot.config.get("api_keys", {}).get("mc_pass", None)
|
password = bot.config.get("api_keys", {}).get("mc_pass", None)
|
||||||
if password is None:
|
if password is None:
|
||||||
|
@ -17,7 +17,7 @@ def mcstatus(inp, bot=None):
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def mclogin(inp, say=None):
|
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(" ")
|
inp = inp.split(" ")
|
||||||
username = inp[0]
|
username = inp[0]
|
||||||
password = inp[1]
|
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:"
|
return "I couldn't log in using " + username + ", either the password is wrong or minecraft login servers are down D:"
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def haspaid(inp):
|
def mcpaid(inp):
|
||||||
".haspaid <username> - Checks if a user has a premium Minecraft account"
|
".mcpaid <username> -- Checks if a user has a premium Minecraft account"
|
||||||
login = http.get("http://www.minecraft.net/haspaid.jsp?user=" + inp)
|
login = http.get("http://www.minecraft.net/haspaid.jsp?user=" + inp)
|
||||||
if "true" in login:
|
if "true" in login:
|
||||||
return "The account \'" + inp + "\' is a premium Minecraft account! :D"
|
return "The account \'" + inp + "\' is a premium Minecraft account! :D"
|
||||||
|
|
Reference in a new issue