diff options
author | Jordan Bracco <href@random.sh> | 2022-12-20 12:22:41 +0000 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2022-12-20 19:29:42 +0100 |
commit | e78e8049334bea5336d87f0909d9e1a3876989e5 (patch) | |
tree | 88f1abcd9f814d0f8d68813029c99d89731cc66d /lib/irc.ex | |
parent | Re-reorg files a bit, lol, refs T77. (diff) |
Rename IRC.{Connection,PuppetConnection} to Nola.Irc.{Connection,PuppetConnection}, refs T77.
Diffstat (limited to 'lib/irc.ex')
-rw-r--r-- | lib/irc.ex | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -5,13 +5,13 @@ defmodule Nola.Irc do def env(key, default \\ nil), do: Keyword.get(env(), key, default) def send_message_as(account, network, channel, text, force_puppet \\ false) do - connection = IRC.Connection.get_network(network) - if connection && (force_puppet || IRC.PuppetConnection.whereis(account, connection)) do - IRC.PuppetConnection.start_and_send_message(account, connection, channel, text) + connection = Nola.Irc.Connection.get_network(network) + if connection && (force_puppet || Nola.Irc.PuppetConnection.whereis(account, connection)) do + Nola.Irc.PuppetConnection.start_and_send_message(account, connection, channel, text) else user = Nola.UserTrack.find_by_account(network, account) nick = if(user, do: user.nick, else: account.name) - IRC.Connection.broadcast_message(network, channel, "<#{nick}> #{text}") + Nola.Irc.Connection.broadcast_message(network, channel, "<#{nick}> #{text}") end end @@ -31,19 +31,19 @@ defmodule Nola.Irc do def application_childs do import Supervisor.Spec - IRC.Connection.setup() + Nola.Irc.Connection.setup() [ - worker(Registry, [[keys: :duplicate, name: IRC.ConnectionPubSub]], id: :registr_irc_conn), - supervisor(IRC.Connection.Supervisor, [], [name: IRC.Connection.Supervisor]), - supervisor(IRC.PuppetConnection.Supervisor, [], [name: IRC.PuppetConnection.Supervisor]), + worker(Registry, [[keys: :duplicate, name: Nola.Irc.ConnectionPubSub]], id: :registr_irc_conn), + supervisor(Nola.Irc.Connection.Supervisor, [], [name: Nola.Irc.Connection.Supervisor]), + supervisor(Nola.Irc.PuppetConnection.Supervisor, [], [name: Nola.Irc.PuppetConnection.Supervisor]), ] end # Start plugins first to let them get on connection events. def after_start() do Logger.info("Starting connections") - IRC.Connection.start_all() + Nola.Irc.Connection.start_all() end end |