summaryrefslogtreecommitdiff
path: root/lib/lsg/application.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-02-10 21:40:22 +0100
committerhref <href@random.sh>2018-02-10 21:40:22 +0100
commit935a36eecc0faea60236101e11bc9f7cf1872686 (patch)
treeb7b4358dee2eb3fc60681852f62c750ae8c05cb9 /lib/lsg/application.ex
parentsse / embedded player (diff)
update
Diffstat (limited to 'lib/lsg/application.ex')
-rw-r--r--lib/lsg/application.ex11
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