kimi gone wild
This commit is contained in:
36
lib/odinsea/anticheat/supervisor.ex
Normal file
36
lib/odinsea/anticheat/supervisor.ex
Normal file
@@ -0,0 +1,36 @@
|
||||
defmodule Odinsea.AntiCheat.Supervisor do
|
||||
@moduledoc """
|
||||
Supervisor for the Anti-Cheat system.
|
||||
|
||||
Manages:
|
||||
- AutobanManager (singleton)
|
||||
- CheatTracker processes (dynamic)
|
||||
- LieDetector timeout handler
|
||||
"""
|
||||
|
||||
use Supervisor
|
||||
|
||||
def start_link(init_arg) do
|
||||
Supervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
|
||||
end
|
||||
|
||||
@impl true
|
||||
def init(_init_arg) do
|
||||
children = [
|
||||
# Autoban manager (singleton)
|
||||
Odinsea.AntiCheat.AutobanManager,
|
||||
|
||||
# Lie detector timeout handler
|
||||
Odinsea.AntiCheat.LieDetector.TimeoutHandler,
|
||||
|
||||
# Dynamic supervisor for per-character cheat trackers
|
||||
{DynamicSupervisor,
|
||||
name: Odinsea.CheatTrackerSupervisor,
|
||||
strategy: :one_for_one,
|
||||
max_restarts: 1000,
|
||||
max_seconds: 60}
|
||||
]
|
||||
|
||||
Supervisor.init(children, strategy: :one_for_all)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user