diff options
Diffstat (limited to 'lib/lsg_irc/lsg_irc.ex')
-rw-r--r-- | lib/lsg_irc/lsg_irc.ex | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/lsg_irc/lsg_irc.ex b/lib/lsg_irc/lsg_irc.ex index c2782ad..a50abed 100644 --- a/lib/lsg_irc/lsg_irc.ex +++ b/lib/lsg_irc/lsg_irc.ex @@ -1,17 +1,15 @@ defmodule LSG.IRC do require Logger + def env(), do: LSG.env(:irc) + def env(key, default \\ nil), do: Keyword.get(env(), key, default) def application_childs do - env = Application.get_env(:lsg, :irc) import Supervisor.Spec IRC.Connection.setup() IRC.Plugin.setup() - # Probably just needed for migration - #for plugin <- Application.get_env(:lsg, :irc)[:plugins], do: IRC.Plugin.declare(plugin) - [ worker(Registry, [[keys: :duplicate, name: IRC.ConnectionPubSub]], id: :registr_irc_conn), worker(Registry, [[keys: :duplicate, name: IRC.PubSub]], id: :registry_irc), @@ -25,13 +23,12 @@ defmodule LSG.IRC do ] end + # Start plugins first to let them get on connection events. def after_start() do - # Start plugins first to let them get on connection events. - Logger.debug("IRC.after_start - initializing plugins") + Logger.info("Starting plugins") IRC.Plugin.start_all() - Logger.debug("IRC.after_start - initializing connections") + Logger.info("Starting connections") IRC.Connection.start_all() - Logger.debug("IRC.after_start - ok") end end |