summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/service.c b/src/core/service.c
index a8bd402..6cf2b16 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -26,6 +26,8 @@ void hybbx_mains_proxy_plugin_tick(void);
#include "hybbx/instance.h"
#include "hybbx/log.h"
#include "hybbx/monitor.h"
+#include "hybbx/chess.h"
+#include <errno.h>
#include "hybbx/security.h"
#include "hybbx/security_ban.h"
#include "hybbx/util.h"
@@ -166,6 +168,7 @@ void hybbx_service_destroy(hybbx_service_t *service)
}
hybbx_monitor_shutdown();
+ hybbx_chess_init();
hybbx_log_shutdown();
hybbx_security_log_shutdown();
hybbx_security_ban_shutdown();
@@ -978,10 +981,21 @@ hybbx_result_t hybbx_service_run(hybbx_service_t *service)
Sleep(1000);
#else
static unsigned prune_tick;
+ static unsigned health_tick;
sleep(1);
+
+ /* Periodic health log — every 300s (5 min) */
+ health_tick++;
+ if (health_tick >= 300u) {
+ health_tick = 0;
+ hybbx_log_info("[service] health: running=%d transports=%u sessions_active (tick)",
+ svc->running, svc->transport_count);
+ }
+
hybbx_security_ban_tick();
hybbx_monitor_tick(service);
+ hybbx_chess_tick(service);
hybbx_broadcast_ax25_tick(service);
#ifdef HYBBX_HAVE_PLUGIN_MAINS_PROXY
hybbx_mains_proxy_plugin_tick();
@@ -1209,6 +1223,7 @@ hybbx_result_t hybbx_service_apply_config(hybbx_service_t *service,
hybbx_log_config_apply(config);
hybbx_security_log_config_apply(config);
hybbx_monitor_config_apply(config);
+ hybbx_chess_config_apply(config);
hybbx_security_ban_config_apply(config);
service_apply_texts(svc, config);
hybbx_chat_config_apply(&svc->chat, config);
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com