diff options
author | href <href@random.sh> | 2018-02-10 21:40:22 +0100 |
---|---|---|
committer | href <href@random.sh> | 2018-02-10 21:40:22 +0100 |
commit | 935a36eecc0faea60236101e11bc9f7cf1872686 (patch) | |
tree | b7b4358dee2eb3fc60681852f62c750ae8c05cb9 /lib/lsg/application.ex | |
parent | sse / embedded player (diff) |
update
Diffstat (limited to 'lib/lsg/application.ex')
-rw-r--r-- | lib/lsg/application.ex | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/lsg/application.ex b/lib/lsg/application.ex index 73ec04d..0df3c87 100644 --- a/lib/lsg/application.ex +++ b/lib/lsg/application.ex @@ -18,9 +18,7 @@ defmodule LSG.Application do worker(LSG.Icecast, []), worker(LSG.IRC.ConnectionHandler, [irc_client]), worker(LSG.IRC.LoginHandler, [irc_client]), - worker(LSG.IRC.BroadcastHandler, [irc_client]), - worker(LSG.IRC.NpHandler, [irc_client]), - ] + ] ++ irc_handlers(irc_client) # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options @@ -34,4 +32,11 @@ defmodule LSG.Application do LSGWeb.Endpoint.config_change(changed, removed) :ok end + + defp irc_handlers(irc_client) do + import Supervisor.Spec + for handler <- Application.get_env(:lsg, :irc)[:handlers] do + worker(handler, [irc_client]) + end + end end |