Renovate the module system and implement adding and resuming pool instances using the new relay/alias/network system
This commit is contained in:
22
commands/pass.py
Normal file
22
commands/pass.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import main
|
||||
|
||||
class Pass:
|
||||
def __init__(self, *args):
|
||||
self.password(*args)
|
||||
|
||||
def password(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
||||
if authed:
|
||||
info("You are already authenticated")
|
||||
return
|
||||
else:
|
||||
if length == 2:
|
||||
if spl[1] == main.config["Password"]:
|
||||
success("Authenticated successfully")
|
||||
obj.authed = True
|
||||
return
|
||||
else:
|
||||
failure("Password incorrect")
|
||||
obj.transport.loseConnection()
|
||||
return
|
||||
else:
|
||||
incUsage("pass")
|
||||
Reference in New Issue
Block a user