Set up config loading in plugins/mclogin.py

This commit is contained in:
lukeroge 2011-11-21 19:49:14 +13:00
parent ae94b2ca6a
commit fb527e7d2d

View file

@ -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: