diff --git a/core/loader.py b/core/loader.py index 611fc9f..50a9c6d 100644 --- a/core/loader.py +++ b/core/loader.py @@ -81,7 +81,7 @@ class Loader: self.PFactory: factory.ProtocolFactorty = factory.ProtocolFactorty(self) - self.RpcServer: rpc_mod.JSonRpcServer = rpc_mod.JSonRpcServer(self) + self.RpcServer: rpc_mod.JSonRpcServer = rpc_mod.JSonRpcServer(self, hostname='0.0.0.0') self.Logs.debug(self.Utils.tr("Loader %s success", __name__)) diff --git a/mods/defender/threads.py b/mods/defender/threads.py index e785238..6d171de 100644 --- a/mods/defender/threads.py +++ b/mods/defender/threads.py @@ -15,7 +15,7 @@ async def coro_cloudfilt_scan(uplink: 'Defender'): while uplink.cloudfilt_isRunning: list_to_remove:list = [] for user in uplink.Schemas.DB_CLOUDFILT_USERS: - uplink.mod_utils.action_scan_client_with_cloudfilt(uplink, user) + await uplink.mod_utils.action_scan_client_with_cloudfilt(uplink, user) list_to_remove.append(user) await asyncio.sleep(1) @@ -30,7 +30,7 @@ async def coro_freeipapi_scan(uplink: 'Defender'): list_to_remove: list = [] for user in uplink.Schemas.DB_FREEIPAPI_USERS: - uplink.mod_utils.action_scan_client_with_freeipapi(uplink, user) + await uplink.mod_utils.action_scan_client_with_freeipapi(uplink, user) list_to_remove.append(user) await asyncio.sleep(1) @@ -44,11 +44,13 @@ async def coro_abuseipdb_scan(uplink: 'Defender'): while uplink.abuseipdb_isRunning: list_to_remove: list = [] + print(uplink.Schemas.DB_ABUSEIPDB_USERS) for user in uplink.Schemas.DB_ABUSEIPDB_USERS: - uplink.mod_utils.action_scan_client_with_abuseipdb(uplink, user) + await uplink.mod_utils.action_scan_client_with_abuseipdb(uplink, user) list_to_remove.append(user) await asyncio.sleep(1) + print(list_to_remove) for user_model in list_to_remove: uplink.Schemas.DB_ABUSEIPDB_USERS.remove(user_model) @@ -59,7 +61,7 @@ async def coro_local_scan(uplink: 'Defender'): while uplink.localscan_isRunning: list_to_remove:list = [] for user in uplink.Schemas.DB_LOCALSCAN_USERS: - uplink.mod_utils.action_scan_client_with_local_socket(uplink, user) + await uplink.mod_utils.action_scan_client_with_local_socket(uplink, user) list_to_remove.append(user) await asyncio.sleep(1) @@ -74,7 +76,7 @@ async def coro_psutil_scan(uplink: 'Defender'): list_to_remove:list = [] for user in uplink.Schemas.DB_PSUTIL_USERS: - uplink.mod_utils.action_scan_client_with_psutil(uplink, user) + await uplink.mod_utils.action_scan_client_with_psutil(uplink, user) list_to_remove.append(user) await asyncio.sleep(1) diff --git a/mods/jsonrpc/mod_jsonrpc.py b/mods/jsonrpc/mod_jsonrpc.py index 61787d3..b7f68ed 100644 --- a/mods/jsonrpc/mod_jsonrpc.py +++ b/mods/jsonrpc/mod_jsonrpc.py @@ -84,7 +84,7 @@ class Jsonrpc(IModule): await self.sync_db() if self.ctx.Config.SERVEUR_PROTOCOL.lower() != 'unreal6': - self.ctx.ModuleUtils.unload_one_module(self.module_name, False) + await self.ctx.ModuleUtils.unload_one_module(self.module_name, False) return None # Is RPC Active? diff --git a/requirements.txt b/requirements.txt index c0408c3..1d602d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,6 @@ psutil==7.1.2 PyYAML==6.0.3 requests==2.32.5 SQLAlchemy==2.0.44 -unrealircd_rpc_py==3.0.2 +unrealircd_rpc_py==3.0.4 starlette==0.50.0 uvicorn==0.38.0 \ No newline at end of file diff --git a/version.json b/version.json index 7583b06..08625a1 100644 --- a/version.json +++ b/version.json @@ -3,7 +3,7 @@ "requests": "2.32.5", "psutil": "7.1.2", - "unrealircd_rpc_py": "3.0.3", + "unrealircd_rpc_py": "3.0.4", "sqlalchemy": "2.0.44", "faker": "37.12.0", "pyyaml": "6.0.3",