Add support for Hybrid > 8.2.44 (#283)

The module system changed, modules now need to be loaded explicitly
This commit is contained in:
2024-06-21 21:38:16 +02:00
committed by GitHub
parent 9f33633cc7
commit 052198c61b
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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";