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
import urllib
@hook.command(autohelp=False, input=None, notice=None)
@hook.command(autohelp=False, input=None, notice=None, bot=None)
def mccheck(inp):
".mccheck - Attempts to log in to minecraft"
password = input.bot.config["api_keys"]["mc"][0]
password = input.bot.config["api_keys"]["mc"][1]
username = bot.config["api_keys"]["mc_user"]
password = bot.config["api_keys"]["mc_pass"]
notice(username + " " + password)
login = urllib.urlopen("https://login.minecraft.net/?user="+username+"&password="+password+"&&version=13").read()
if username in login: