From 9f2da13f8836cb6f4fe13ab621521efe0a02c415 Mon Sep 17 00:00:00 2001 From: adator <85586985+adator85@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:15:43 +0100 Subject: [PATCH] Unload the module when the protocol is not unreal6 --- mods/jsonrpc/mod_jsonrpc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mods/jsonrpc/mod_jsonrpc.py b/mods/jsonrpc/mod_jsonrpc.py index b0fc88b..9960e5b 100644 --- a/mods/jsonrpc/mod_jsonrpc.py +++ b/mods/jsonrpc/mod_jsonrpc.py @@ -60,6 +60,10 @@ class Jsonrpc(IModule): self.ModConfig = self.ModConfModel(jsonrpc=0) + if self.Config.SERVEUR_PROTOCOL != 'unreal6': + self.Loader.ModuleUtils.unload_one_module(self.Irc, self.module_name, False) + return None + # Is RPC Active? self.is_streaming = False @@ -108,6 +112,11 @@ class Jsonrpc(IModule): self.Logs.error(f"JSONRPC ERROR: {err.__str__()}") def unload(self) -> None: + + if self.Config.SERVEUR_PROTOCOL != 'unreal6': + self.Loader.ModuleUtils.unload_one_module(self.Irc, self.module_name, False) + return None + if self.is_streaming: self.Protocol.send_priv_msg( nick_from=self.Config.SERVICE_NICKNAME,