Renamed mclogin.py > mctools.py
This commit is contained in:
parent
698d86e1a4
commit
ab93cf4094
|
@ -2,8 +2,8 @@ from util import hook
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def mccheck(inp, bot=None):
|
def mcstatus(inp, bot=None):
|
||||||
".mccheck - Attempts to log in to minecraft"
|
".mcstatus - Attempts to log in to minecraft"
|
||||||
username = bot.config["api_keys"]["mc_user"]
|
username = bot.config["api_keys"]["mc_user"]
|
||||||
password = bot.config["api_keys"]["mc_pass"]
|
password = bot.config["api_keys"]["mc_pass"]
|
||||||
login = urllib.urlopen("https://login.minecraft.net/?user="+username+"&password="+password+"&&version=13").read()
|
login = urllib.urlopen("https://login.minecraft.net/?user="+username+"&password="+password+"&&version=13").read()
|
||||||
|
@ -12,15 +12,6 @@ def mccheck(inp, bot=None):
|
||||||
else:
|
else:
|
||||||
return "Attempting to connect to Minecraft login servers... Login servers appear to be offline :("
|
return "Attempting to connect to Minecraft login servers... Login servers appear to be offline :("
|
||||||
|
|
||||||
@hook.command
|
|
||||||
def haspaid(inp):
|
|
||||||
".haspaid <username> - Checks if a user has a premium Minecraft account"
|
|
||||||
login = urllib.urlopen("http://www.minecraft.net/haspaid.jsp?user=" + inp).read()
|
|
||||||
if "true" in login:
|
|
||||||
return "The user " + inp + " has a premium Minecraft account."
|
|
||||||
else:
|
|
||||||
return "The user " + inp + " either has not paid or is an unused nickname."
|
|
||||||
|
|
||||||
@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."
|
||||||
|
@ -33,3 +24,13 @@ def mclogin(inp, say=None):
|
||||||
return "I logged in with " + username
|
return "I logged in with " + username
|
||||||
else:
|
else:
|
||||||
return "I couldn't log in using " + username + ", either the password changed or minecraft auth is down :O"
|
return "I couldn't log in using " + username + ", either the password changed or minecraft auth is down :O"
|
||||||
|
|
||||||
|
@hook.command
|
||||||
|
def haspaid(inp):
|
||||||
|
".haspaid <username> - Checks if a user has a premium Minecraft account"
|
||||||
|
login = urllib.urlopen("http://www.minecraft.net/haspaid.jsp?user=" + inp).read()
|
||||||
|
if "true" in login:
|
||||||
|
return "The user " + inp + " has a premium Minecraft account."
|
||||||
|
else:
|
||||||
|
return "The user " + inp + " either has not paid or is an unused nickname."
|
||||||
|
|
Reference in a new issue