summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-05-02 19:10:43 +0200
committerhref <href@random.sh>2018-05-02 19:10:43 +0200
commit98d364a07f02db72eb75eeb6c3c041b7b86a6ba5 (patch)
tree63c7f7249727d9ce5fa9b55bd61e317c3db1076b /lib
parentmeh (diff)
parentchannels param (diff)
Merge branch 'master' into pouet
Diffstat (limited to 'lib')
-rw-r--r--lib/irc/login_handler.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irc/login_handler.ex b/lib/irc/login_handler.ex
index fdec852..4b02dc2 100644
--- a/lib/irc/login_handler.ex
+++ b/lib/irc/login_handler.ex
@@ -5,7 +5,9 @@ defmodule 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