Implementing WebSocked Support for immediately ban-messages

This commit is contained in:
2025-12-15 20:12:41 +01:00
parent 5163e4f1f4
commit 3ad4821cb7
15 changed files with 930 additions and 139 deletions

View File

@@ -73,8 +73,12 @@ func main() {
router.Static("/static", "./pkg/web/static")
}
// Initialize WebSocket hub
wsHub := web.NewHub()
go wsHub.Run()
// Register all application routes, including the static files and templates.
web.RegisterRoutes(router)
web.RegisterRoutes(router, wsHub)
// Check if LOTR mode is active
isLOTRMode := isLOTRModeActive(settings.AlertCountries)