From fa944b4e37f2f56d1b4783b052497884779fc1d8 Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 23 Jun 2014 03:16:09 +0200 Subject: fix comments --- webtoken.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'webtoken.py') diff --git a/webtoken.py b/webtoken.py index 438e2ba..8c65656 100644 --- a/webtoken.py +++ b/webtoken.py @@ -1,5 +1,5 @@ #pylint: disable=F0401 -import mysqlhack +import mysqlhack #pylint: disable=unused-import import thread from re import match from com.ziclix.python.sql import zxJDBC @@ -43,7 +43,6 @@ def generate_token(length): return token def get_token(uuid): - # ae795aa86327408e92ab25c8a59f3ba1 results = mysql_query("SELECT DISTINCT `token`, `email` FROM register_tokens WHERE `uuid` = ? LIMIT 1", (uuid,)) return results[0] if len(results) == 1 else None @@ -70,8 +69,9 @@ def tokengen_command(sender, args): plugHeader(sender, "Website Token") if isPlayer(sender): if checkargs(sender, args, 1, -1): - # email regex, needs something followed by an @ followed by something - mail = " ".join(args) # email may contain spaces + # email may contain spaces + mail = " ".join(args) + # email regex, needs something followed by an @ followed by domain or IP if match("^.+@(.+\\..{2,}|\\[[0-9a-fA-F:.]+\\])$", mail) != None: token = generate_token(6) uuid = sender.getUniqueId().toString().replace("-", "") -- cgit v1.2.3