Set up config loading in plugins/mclogin.py
This commit is contained in:
parent
ae94b2ca6a
commit
fb527e7d2d
1 changed files with 3 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
||||||
from util import hook
|
from util import hook
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
@hook.command(autohelp=False, input=None, notice=None)
|
@hook.command(autohelp=False, input=None, notice=None, bot=None)
|
||||||
def mccheck(inp):
|
def mccheck(inp):
|
||||||
".mccheck - Attempts to log in to minecraft"
|
".mccheck - Attempts to log in to minecraft"
|
||||||
password = input.bot.config["api_keys"]["mc"][0]
|
username = bot.config["api_keys"]["mc_user"]
|
||||||
password = input.bot.config["api_keys"]["mc"][1]
|
password = bot.config["api_keys"]["mc_pass"]
|
||||||
notice(username + " " + password)
|
notice(username + " " + password)
|
||||||
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()
|
||||||
if username in login:
|
if username in login:
|
||||||
|
|
Reference in a new issue