This commit is contained in:
parent
09421ee792
commit
392f6fa0b5
1 changed files with 8 additions and 9 deletions
|
@ -37,12 +37,12 @@ class IRCatModule:
|
|||
args[0] = args[0][1:] if args[0][0] == ":" else args[0]
|
||||
if len(args) > 0 and args[0].lower() == "verify":
|
||||
if len(args) == 3:
|
||||
if args[1] in self.memory:
|
||||
if args[2] == self.memory[args[1]][0]:
|
||||
self.sql.nickserv_register(nick=args[1], password=self.memory[args[1]][1], email=self.memory[args[1]][2])
|
||||
nck = args[1]
|
||||
if args[1].lower() in self.memory:
|
||||
if args[2] == self.memory[args[1].lower()][0]:
|
||||
self.sql.nickserv_register(nick=args[1].lower(), password=self.memory[args[1]][1], email=self.memory[args[1]][2])
|
||||
nck = args[1].lower()
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Done, you may now identify as {nck}.\r\n", "UTF-8"))
|
||||
del self.memory[args[1]]
|
||||
del self.memory[args[1].lower()]
|
||||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Nickname doesn't exist, try registering again?\r\n", "UTF-8"))
|
||||
else:
|
||||
|
@ -59,7 +59,7 @@ class IRCatModule:
|
|||
server.ehlo()
|
||||
server.login(self.smtp_username, self.smtp_password)
|
||||
server.sendmail(self.smtp_username, args[2], message)
|
||||
self.memory[nick] = [token, args[1], args[2]]
|
||||
self.memory[nick.lower()] = [token, args[1], args[2]]
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Email sent, please verify.\r\n", "UTF-8"))
|
||||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :A verification is already pending.\r\n", "UTF-8"))
|
||||
|
@ -67,12 +67,11 @@ class IRCatModule:
|
|||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Needs 3 arguments, nickname, password, and email.\r\n", "UTF-8"))
|
||||
elif len(args) > 0 and args[0].lower() == "identify":
|
||||
nck = nick if len(args) == 2 else args[2]
|
||||
temp = self.sql.nickserv_identify(nick=nck, password=args[1])
|
||||
print(temp)
|
||||
temp = self.sql.nickserv_identify(nick=nck.lower(), password=args[1])
|
||||
if temp != False:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Now, it would've been a successful identification, but this is work in progress.\r\n", "UTF-8"))
|
||||
else:
|
||||
if nick in self.memory:
|
||||
if nick.lower() in self.memory:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Your account isn't verified, please verify now.\r\n", "UTF-8"))
|
||||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Invalid username/password.\r\n", "UTF-8"))
|
||||
|
|
Loading…
Add table
Reference in a new issue