evol 5
This commit is contained in:
@@ -9,7 +9,7 @@ from utils.config.parser import extract_value
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def on_file_received(self, file):
|
||||
def on_file_received(self: object, file: str) -> None:
|
||||
"""Handles the event when a file is successfully received.
|
||||
|
||||
Args:
|
||||
|
||||
@@ -9,7 +9,7 @@ from utils.database.connection import connetti_db
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def ftp_SITE_ADDU(self, line):
|
||||
def ftp_SITE_ADDU(self: object, line: str) -> None:
|
||||
"""Adds a virtual user, creates their directory, and saves their details to the database.
|
||||
"""
|
||||
cfg = self.cfg
|
||||
@@ -50,7 +50,7 @@ def ftp_SITE_ADDU(self, line):
|
||||
self.respond(f'501 SITE ADDU failed: {e}.')
|
||||
print(e)
|
||||
|
||||
def ftp_SITE_DISU(self, line):
|
||||
def ftp_SITE_DISU(self: object, line: str) -> None:
|
||||
"""Removes a virtual user from the authorizer and marks them as deleted in the database."""
|
||||
cfg = self.cfg
|
||||
parms = line.split()
|
||||
@@ -77,7 +77,7 @@ def ftp_SITE_DISU(self, line):
|
||||
self.respond('501 SITE DISU failed.')
|
||||
print(e)
|
||||
|
||||
def ftp_SITE_ENAU(self, line):
|
||||
def ftp_SITE_ENAU(self: object, line: str) -> None:
|
||||
"""Restores a virtual user by updating their status in the database and adding them back to the authorizer."""
|
||||
cfg = self.cfg
|
||||
parms = line.split()
|
||||
@@ -116,7 +116,7 @@ def ftp_SITE_ENAU(self, line):
|
||||
self.respond('501 SITE ENAU failed.')
|
||||
print(e)
|
||||
|
||||
def ftp_SITE_LSTU(self, line):
|
||||
def ftp_SITE_LSTU(self: object, line: str) -> None:
|
||||
"""Lists all virtual users from the database."""
|
||||
cfg = self.cfg
|
||||
users_list = []
|
||||
|
||||
Reference in New Issue
Block a user