diff options
author | Jordan Bracco <href@random.sh> | 2022-12-17 13:47:11 +0000 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2022-12-20 19:29:41 +0100 |
commit | fd4afd7c7acd9b5fda75b628a7e19d0149d8b889 (patch) | |
tree | df571d49fa9dc9c3cd58c94033b9fc81c7b7f8ec /lib/irc | |
parent | Rename to Nola, pt. 1. Refs T77 (diff) |
Nola rename cont. pt. 2. Refs T77.
`find lib -name "*.ex" -type f | xargs sed -i '' 's/LSG/Nola/g'`
Diffstat (limited to 'lib/irc')
-rw-r--r-- | lib/irc/account.ex | 10 | ||||
-rw-r--r-- | lib/irc/connection.ex | 2 | ||||
-rw-r--r-- | lib/irc/irc.ex | 2 | ||||
-rw-r--r-- | lib/irc/membership.ex | 2 | ||||
-rw-r--r-- | lib/irc/plugin_supervisor.ex | 2 | ||||
-rw-r--r-- | lib/irc/puppet_connection.ex | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/lib/irc/account.ex b/lib/irc/account.ex index 46c7f6e..45680f8 100644 --- a/lib/irc/account.ex +++ b/lib/irc/account.ex @@ -32,7 +32,7 @@ defmodule IRC.Account do end def file(base) do - to_charlist(LSG.data_path() <> "/account_#{base}.dets") + to_charlist(Nola.data_path() <> "/account_#{base}.dets") end defp from_struct(%__MODULE__{id: id, name: name, token: token}) do @@ -355,7 +355,7 @@ defmodule IRC.Account do def handle_info({:irc, :text, m = %IRC.Message{text: "web"}}, state) do auth_url = Untappd.auth_url() - login_url = LSG.AuthToken.new_url(m.account.id, nil) + login_url = Nola.AuthToken.new_url(m.account.id, nil) m.replyfun.("-> " <> login_url) {:noreply, state} end @@ -364,7 +364,7 @@ defmodule IRC.Account do code = String.downcase(EntropyString.small_id()) IRC.Account.put_meta(m.account, "sms-validation-code", code) IRC.Account.put_meta(m.account, "sms-validation-target", m.network) - number = LSG.IRC.SmsPlugin.my_number() + number = Nola.IRC.SmsPlugin.my_number() text = "To enable or change your number for SMS messaging, please send:" <> " \"enable #{code}\" to #{number}" m.replyfun.(text) @@ -376,7 +376,7 @@ defmodule IRC.Account do IRC.Account.delete_meta(m.account, "telegram-id") IRC.Account.put_meta(m.account, "telegram-validation-code", code) IRC.Account.put_meta(m.account, "telegram-validation-target", m.network) - text = "To enable or change your number for telegram messaging, please open #{LSG.Telegram.my_path()} and send:" + text = "To enable or change your number for telegram messaging, please open #{Nola.Telegram.my_path()} and send:" <> " \"/enable #{code}\"" m.replyfun.(text) {:noreply, state} @@ -384,7 +384,7 @@ defmodule IRC.Account do def handle_info({:irc, :text, m = %IRC.Message{text: "enable-untappd"}}, state) do auth_url = Untappd.auth_url() - login_url = LSG.AuthToken.new_url(m.account.id, {:external_redirect, auth_url}) + login_url = Nola.AuthToken.new_url(m.account.id, {:external_redirect, auth_url}) m.replyfun.(["To link your Untappd account, open this URL:", login_url]) {:noreply, state} end diff --git a/lib/irc/connection.ex b/lib/irc/connection.ex index 9382714..86d8279 100644 --- a/lib/irc/connection.ex +++ b/lib/irc/connection.ex @@ -92,7 +92,7 @@ defmodule IRC.Connection do :dets.open_file(dets(), []) end - def dets(), do: to_charlist(LSG.data_path("/connections.dets")) + def dets(), do: to_charlist(Nola.data_path("/connections.dets")) def lookup(id) do case :dets.lookup(dets(), id) do diff --git a/lib/irc/irc.ex b/lib/irc/irc.ex index d9fdfb5..71d6d93 100644 --- a/lib/irc/irc.ex +++ b/lib/irc/irc.ex @@ -41,7 +41,7 @@ defmodule IRC do def admin?(%Message{sender: sender}), do: admin?(sender) def admin?(%{nick: nick, user: user, host: host}) do - for {n, u, h} <- LSG.IRC.env(:admins, []) do + for {n, u, h} <- Nola.IRC.env(:admins, []) do admin_part_match?(n, nick) && admin_part_match?(u, user) && admin_part_match?(h, host) end |> Enum.any? diff --git a/lib/irc/membership.ex b/lib/irc/membership.ex index 74ed1b4..b727dfd 100644 --- a/lib/irc/membership.ex +++ b/lib/irc/membership.ex @@ -7,7 +7,7 @@ defmodule IRC.Membership do # Format: {key, last_seen} defp dets() do - to_charlist(LSG.data_path <> "/memberships.dets") + to_charlist(Nola.data_path <> "/memberships.dets") end def start_link() do diff --git a/lib/irc/plugin_supervisor.ex b/lib/irc/plugin_supervisor.ex index 24ac683..a65ad09 100644 --- a/lib/irc/plugin_supervisor.ex +++ b/lib/irc/plugin_supervisor.ex @@ -33,7 +33,7 @@ defmodule IRC.Plugin do end end - def dets(), do: to_charlist(LSG.data_path("/plugins.dets")) + def dets(), do: to_charlist(Nola.data_path("/plugins.dets")) def setup() do :dets.open_file(dets(), []) diff --git a/lib/irc/puppet_connection.ex b/lib/irc/puppet_connection.ex index f12cbf7..91a26b3 100644 --- a/lib/irc/puppet_connection.ex +++ b/lib/irc/puppet_connection.ex @@ -77,7 +77,7 @@ defmodule IRC.PuppetConnection do def handle_continue(:connect, state) do #ipv6 = if @env == :prod do - # subnet = LSG.Subnet.assign(state.account_id) + # subnet = Nola.Subnet.assign(state.account_id) # IRC.Account.put_meta(IRC.Account.get(state.account_id), "subnet", subnet) # ip = Pfx.host(subnet, 1) # {:ok, ipv6} = :inet_parse.ipv6_address(to_charlist(ip)) |