From f7c80d190e0adf53d79bc36e6de2dd8285fe0580 Mon Sep 17 00:00:00 2001 From: adator <85586985+adator85@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:21:01 +0200 Subject: [PATCH] V5.3.9 --- core/installation.py | 7 +++++-- core/irc.py | 2 +- mods/mod_command.py | 1 + mods/mod_jsonrpc.py | 3 +++ version.json | 4 ++-- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/installation.py b/core/installation.py index 202bf35..e988bd5 100644 --- a/core/installation.py +++ b/core/installation.py @@ -37,6 +37,7 @@ def __init__(self) -> None: self.set_configuration() if self.skip_install: + self.check_packages_version() return None self.check_packages_version() @@ -85,11 +86,13 @@ def set_configuration(self): if not os.path.exists(os.path.join(self.config.defender_install_folder, 'core', 'configuration.json')): # If configuration file do not exist - exit("/!\\ Configuration file (core/configuration.json) doesn't exist /!\\") + exit("/!\\ Configuration file (core/configuration.json) doesn't exist! please create it /!\\") # Exclude Windows OS from the installation if os.name == 'nt': - #print('/!\\ Skip installation /!\\') + # If windows, modify pip and python virtual environment executable + self.config.venv_pip_executable = f'{os.path.join(defender_install_folder, venv_folder, "Scripts")}{os.sep}pip.exe' + self.config.venv_python_executable = f'{os.path.join(defender_install_folder, venv_folder, "Scripts")}{os.sep}python.exe' self.skip_install = True return False diff --git a/core/irc.py b/core/irc.py index 5e2eb3a..7c6b812 100644 --- a/core/irc.py +++ b/core/irc.py @@ -313,7 +313,7 @@ def sendPrivMsg(self, msg: str, channel: str = None, nickname: str = None): def send_response(self, responses:list[bytes]) -> None: try: - # print(data) + # print(responses) for data in responses: response = data.decode(self.CHARSET[0]).split() self.cmd(response) diff --git a/mods/mod_command.py b/mods/mod_command.py index 8a04a6e..3921251 100644 --- a/mods/mod_command.py +++ b/mods/mod_command.py @@ -150,6 +150,7 @@ def cmd(self, data:list) -> None: try: message = ' '.join(cmd[3:]) self.Irc.send2socket(f":{dnickname} NOTICE {self.user_to_notice} :[{red}ERROR MSG{nogc}] {message}") + self.Base.logs.error(f"{cmd[1]} - {message}") except KeyError as ke: self.Base.logs.error(ke) except Exception as err: diff --git a/mods/mod_jsonrpc.py b/mods/mod_jsonrpc.py index 2fd9dca..9f24561 100644 --- a/mods/mod_jsonrpc.py +++ b/mods/mod_jsonrpc.py @@ -262,6 +262,9 @@ def _hcmds(self, user:str, channel: any, cmd: list, fullcmd: list = []) -> None: self.Irc.send2socket(f':{dnickname} NOTICE {fromuser} :VHOST : {UserInfo.user.vhost}') self.Irc.send2socket(f':{dnickname} NOTICE {fromuser} :CLIENT PORT : {UserInfo.client_port}') self.Irc.send2socket(f':{dnickname} NOTICE {fromuser} :SERVER PORT : {UserInfo.server_port}') + + self.Irc.send2socket(f':{dnickname} NOTICE {fromuser} :CERTFP : {UserInfo.tls.certfp}') + self.Irc.send2socket(f':{dnickname} NOTICE {fromuser} :CIPHER : {UserInfo.tls.cipher}') self.Irc.send2socket(f':{dnickname} NOTICE {fromuser} :IDLE SINCE : {UserInfo.idle_since}') self.Irc.send2socket(f':{dnickname} NOTICE {fromuser} :CONNECTED SINCE : {UserInfo.connected_since}') diff --git a/version.json b/version.json index c7dac1d..c8e8e6c 100644 --- a/version.json +++ b/version.json @@ -1,9 +1,9 @@ { - "version": "5.3.8", + "version": "5.3.9", "requests": "2.32.3", "psutil": "6.0.0", - "unrealircd_rpc_py": "1.0.5", + "unrealircd_rpc_py": "1.0.6", "sqlalchemy": "2.0.35", "faker": "30.1.0" } \ No newline at end of file