mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 11:14:23 +00:00
New features on branch v6.2.5:
- New capability in base.py to patch the database
- Some minor updates on installation.py.
- Translation feature:
- New library requirement (pyyaml)
- New translation systeme implemented.
- New class translation.py added.
- Module folder updated by adding new folder language.
- Core module updated as well with new language folder.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from logging import Logger
|
||||
from core.classes import user, admin, client, channel, reputation, settings, sasl
|
||||
from core.classes.settings import global_settings
|
||||
from core.classes import translation, user, admin, client, channel, reputation, settings, sasl
|
||||
import core.logs as logs
|
||||
import core.definition as df
|
||||
import core.utils as utils
|
||||
@@ -13,43 +14,53 @@ class Loader:
|
||||
def __init__(self):
|
||||
|
||||
# Load Main Modules
|
||||
self.Definition: df = df
|
||||
self.Definition: df = df
|
||||
|
||||
self.ConfModule: conf_mod = conf_mod
|
||||
self.ConfModule: conf_mod = conf_mod
|
||||
|
||||
self.BaseModule: base_mod = base_mod
|
||||
self.BaseModule: base_mod = base_mod
|
||||
|
||||
self.CommandModule: commands_mod = commands_mod
|
||||
self.CommandModule: commands_mod = commands_mod
|
||||
|
||||
self.LoggingModule: logs = logs
|
||||
self.LoggingModule: logs = logs
|
||||
|
||||
self.Utils: utils = utils
|
||||
self.Utils: utils = utils
|
||||
|
||||
# Load Classes
|
||||
self.ServiceLogging: logs.ServiceLogging = self.LoggingModule.ServiceLogging()
|
||||
self.Settings: settings.Settings = global_settings
|
||||
|
||||
self.Logs: Logger = self.ServiceLogging.get_logger()
|
||||
self.ServiceLogging: logs.ServiceLogging = self.LoggingModule.ServiceLogging()
|
||||
|
||||
self.Settings: settings.Settings = settings.Settings()
|
||||
self.Logs: Logger = self.ServiceLogging.get_logger()
|
||||
|
||||
self.Config: df.MConfig = self.ConfModule.Configuration(self).get_config_model()
|
||||
self.Config: df.MConfig = self.ConfModule.Configuration(self).get_config_model()
|
||||
|
||||
self.Base: base_mod.Base = self.BaseModule.Base(self)
|
||||
self.Settings.global_lang = self.Config.LANG if self.Config.LANG else "EN"
|
||||
|
||||
self.User: user.User = user.User(self)
|
||||
self.Settings.global_logger = self.Logs
|
||||
|
||||
self.Client: client.Client = client.Client(self)
|
||||
self.Translation: translation.Translation = translation.Translation(self)
|
||||
|
||||
self.Admin: admin.Admin = admin.Admin(self)
|
||||
self.Settings.global_translation = self.Translation.get_translation()
|
||||
|
||||
self.Channel: channel.Channel = channel.Channel(self)
|
||||
self.Base: base_mod.Base = self.BaseModule.Base(self)
|
||||
|
||||
self.Reputation: reputation.Reputation = reputation.Reputation(self)
|
||||
self.User: user.User = user.User(self)
|
||||
|
||||
self.Commands: commands_mod.Command = commands_mod.Command(self)
|
||||
self.Settings.global_user = self.User
|
||||
|
||||
self.ModuleUtils: module_mod.Module = module_mod.Module(self)
|
||||
self.Client: client.Client = client.Client(self)
|
||||
|
||||
self.Sasl: sasl.Sasl = sasl.Sasl(self)
|
||||
self.Admin: admin.Admin = admin.Admin(self)
|
||||
|
||||
self.Logs.debug("LOADER Success!")
|
||||
self.Channel: channel.Channel = channel.Channel(self)
|
||||
|
||||
self.Reputation: reputation.Reputation = reputation.Reputation(self)
|
||||
|
||||
self.Commands: commands_mod.Command = commands_mod.Command(self)
|
||||
|
||||
self.ModuleUtils: module_mod.Module = module_mod.Module(self)
|
||||
|
||||
self.Sasl: sasl.Sasl = sasl.Sasl(self)
|
||||
|
||||
self.Logs.debug(self.Utils.tr("Loader %s success", __name__))
|
||||
|
||||
Reference in New Issue
Block a user