This commit is contained in:
parent
71c1acca96
commit
5e2c6f852f
1 changed files with 2 additions and 2 deletions
|
@ -23,11 +23,11 @@ class broker:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
return e[0] if self.fnet.decrypt(e[0][2]) == password else False
|
return e[0] if self.fnet.decrypt(bytes(e[0][2], "UTF-8")) == password else False
|
||||||
except:
|
except:
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
return False
|
return False
|
||||||
def nickserv_register(self, nick, password, email):
|
def nickserv_register(self, nick, password, email):
|
||||||
hashed = self.fnet.encrypt(password).decode()
|
hashed = self.fnet.encrypt(bytes(password, "UTF-8")).decode()
|
||||||
db = self.conn.cursor()
|
db = self.conn.cursor()
|
||||||
db.execute("INSERT INTO nickserv values(?, 'iw', ?, ?, ?);", [nick, hashed, f"user/{nick}", email])
|
db.execute("INSERT INTO nickserv values(?, 'iw', ?, ?, ?);", [nick, hashed, f"user/{nick}", email])
|
Loading…
Add table
Reference in a new issue