From 052198c61b005c009aedd1855b070289e6904257 Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Fri, 21 Jun 2024 21:38:16 +0200 Subject: [PATCH] Add support for Hybrid > 8.2.44 (#283) The module system changed, modules now need to be loaded explicitly --- irctest/controllers/base_hybrid.py | 4 ++++ irctest/controllers/hybrid.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/irctest/controllers/base_hybrid.py b/irctest/controllers/base_hybrid.py index 38d7073..761e837 100644 --- a/irctest/controllers/base_hybrid.py +++ b/irctest/controllers/base_hybrid.py @@ -1,3 +1,4 @@ +from pathlib import Path import shutil import subprocess from typing import Optional @@ -51,6 +52,8 @@ class BaseHybridController(BaseServerController, DirectoryBasedController): ) else: ssl_config = "" + binary_path = shutil.which(self.binary_name) + assert binary_path, f"Could not find '{binary_path}' executable" with self.open_file("server.conf") as fd: fd.write( (self.template_config).format( @@ -60,6 +63,7 @@ class BaseHybridController(BaseServerController, DirectoryBasedController): services_port=services_port, password_field=password_field, ssl_config=ssl_config, + install_prefix=Path(binary_path).parent.parent, ) ) assert self.directory diff --git a/irctest/controllers/hybrid.py b/irctest/controllers/hybrid.py index 65e174a..bb93b99 100644 --- a/irctest/controllers/hybrid.py +++ b/irctest/controllers/hybrid.py @@ -3,6 +3,9 @@ from typing import Set, Type from .base_hybrid import BaseHybridController TEMPLATE_CONFIG = """ +module_base_path = "{install_prefix}/lib/ircd-hybrid/modules"; +.include "./modules.conf" + serverinfo {{ name = "My.Little.Server"; sid = "42X";