summaryrefslogtreecommitdiff
path: root/lib/lsg_irc/login_handler.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-05-02 19:10:36 +0200
committerhref <href@random.sh>2018-05-02 19:10:36 +0200
commit2ce102d8166d46593778d91c924cece1cdc757a2 (patch)
treed72fd8efa12d8cdce9ef0e03f29e34e4b9c10456 /lib/lsg_irc/login_handler.ex
parent (diff)
channels param
Diffstat (limited to '')
-rw-r--r--lib/lsg_irc/login_handler.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/lsg_irc/login_handler.ex b/lib/lsg_irc/login_handler.ex
index f989b40..47ed792 100644
--- a/lib/lsg_irc/login_handler.ex
+++ b/lib/lsg_irc/login_handler.ex
@@ -5,7 +5,9 @@ defmodule LSG.IRC.LoginHandler do
def init([client]) do
ExIRC.Client.add_handler client, self
- {:ok, {client, ["#lsg", "#lsgtest"]}}
+ conf = Application.get_env(:lsg, :irc, []) |> Keyword.get(:irc)
+ channels = Keyword.get(conf, :channels, [])
+ {:ok, {client, channels}}
end
def handle_info(:logged_in, state = {client, channels}) do