This commit is contained in:
parent
1c06dff8d0
commit
e5cc24064d
1 changed files with 35 additions and 28 deletions
|
@ -70,6 +70,7 @@ class IRCatModule:
|
|||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Does not requre arguments\r\n", "UTF-8"))
|
||||
elif len(args) > 0 and args[0].lower() == "register":
|
||||
if not user["identified"]:
|
||||
if len(args) == 3:
|
||||
if not self.sql.nickserv_isexist(nick.lower()):
|
||||
if not nick in self.memory:
|
||||
|
@ -91,7 +92,10 @@ class IRCatModule:
|
|||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :The user {nick} already exists.\r\n", "UTF-8"))
|
||||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :Needs 3 arguments, nickname, password, and email.\r\n", "UTF-8"))
|
||||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :You're already logged in.\r\n", "UTF-8"))
|
||||
elif len(args) > 0 and args[0].lower() == "identify":
|
||||
if not user["identified"]:
|
||||
nck = nick if len(args) == 2 else args[2]
|
||||
temp = self.sql.nickserv_identify(nick=nck.lower(), password=args[1])
|
||||
if temp != False:
|
||||
|
@ -104,10 +108,13 @@ class IRCatModule:
|
|||
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"))
|
||||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :You're already logged in.\r\n", "UTF-8"))
|
||||
else:
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :NickServ Usage:\r\n","UTF-8"))
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :IDENTIFY pass <nick> - Identifies your nickname\r\n","UTF-8"))
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :REGISTER pass email - Register your nickname\r\n","UTF-8"))
|
||||
connection.sendall(bytes(f":NickServ!Meow@PawServ NOTICE {nick} :GROUP - Allows you to sign in to your account with different nicknames\r\n","UTF-8"))
|
||||
return {"success": True}
|
||||
else:
|
||||
return {"success": False}
|
||||
|
|
Loading…
Add table
Reference in a new issue