V4.1.0 change configuration systeme

This commit is contained in:
adator
2024-08-04 00:37:03 +02:00
parent 1837edf1c2
commit b9e4878764
6 changed files with 162 additions and 57 deletions

View File

@@ -2,7 +2,7 @@ import ssl, re, importlib, sys, time, threading, socket
from ssl import SSLSocket
from datetime import datetime, timedelta
from typing import Union
from core.configuration import Config
from core.loadConf import Config
from core.base import Base
class Irc:
@@ -24,7 +24,7 @@ class Irc:
self.CHARSET = ['utf-8', 'iso-8859-1'] # Charset utiliser pour décoder/encoder les messages
self.SSL_VERSION = None # Version SSL
self.Config = Config()
self.Config = Config().ConfigModel
# Liste des commandes internes du bot
self.commands_level = {
@@ -111,6 +111,11 @@ class Irc:
time.sleep(0.5)
self.Base.logs.warning('--> Waiting for socket to close ...')
# Reload configuration
self.Base.logs.debug('Reloading configuration')
self.Config = Config().ConfigModel
self.Base = Base(self.Config)
self.__create_socket()
self.__link(self.IrcSocket)
self.load_existing_modules()