summaryrefslogtreecommitdiff
path: root/lib/lsg_irc/base_plugin.ex
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/lsg_irc/base_plugin.ex16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/lsg_irc/base_plugin.ex b/lib/lsg_irc/base_plugin.ex
index 7153c70..ee0352e 100644
--- a/lib/lsg_irc/base_plugin.ex
+++ b/lib/lsg_irc/base_plugin.ex
@@ -1,4 +1,4 @@
-defmodule LSG.IRC.BasePlugin do
+defmodule Nola.IRC.BasePlugin do
def irc_doc, do: nil
@@ -32,7 +32,7 @@ defmodule LSG.IRC.BasePlugin do
end
def handle_info({:irc, :trigger, "plugin", %{trigger: %{type: :query, args: [plugin]}} = m}, _) do
- module = Module.concat([LSG.IRC, Macro.camelize(plugin<>"_plugin")])
+ module = Module.concat([Nola.IRC, Macro.camelize(plugin<>"_plugin")])
with true <- Code.ensure_loaded?(module),
pid when is_pid(pid) <- GenServer.whereis(module)
do
@@ -51,7 +51,7 @@ defmodule LSG.IRC.BasePlugin do
end
def handle_info({:irc, :trigger, "plugin", %{trigger: %{type: :plus, args: [plugin]}} = m}, _) do
- module = Module.concat([LSG.IRC, Macro.camelize(plugin<>"_plugin")])
+ module = Module.concat([Nola.IRC, Macro.camelize(plugin<>"_plugin")])
with true <- Code.ensure_loaded?(module),
IRC.Plugin.switch(module, true),
{:ok, pid} <- IRC.Plugin.start(module)
@@ -66,7 +66,7 @@ defmodule LSG.IRC.BasePlugin do
end
def handle_info({:irc, :trigger, "plugin", %{trigger: %{type: :tilde, args: [plugin]}} = m}, _) do
- module = Module.concat([LSG.IRC, Macro.camelize(plugin<>"_plugin")])
+ module = Module.concat([Nola.IRC, Macro.camelize(plugin<>"_plugin")])
with true <- Code.ensure_loaded?(module),
pid when is_pid(pid) <- GenServer.whereis(module),
:ok <- GenServer.stop(pid),
@@ -82,7 +82,7 @@ defmodule LSG.IRC.BasePlugin do
def handle_info({:irc, :trigger, "plugin", %{trigger: %{type: :minus, args: [plugin]}} = m}, _) do
- module = Module.concat([LSG.IRC, Macro.camelize(plugin<>"_plugin")])
+ module = Module.concat([Nola.IRC, Macro.camelize(plugin<>"_plugin")])
with true <- Code.ensure_loaded?(module),
pid when is_pid(pid) <- GenServer.whereis(module),
:ok <- GenServer.stop(pid)
@@ -103,7 +103,7 @@ defmodule LSG.IRC.BasePlugin do
end
def handle_info({:irc, :trigger, "help", m = %{trigger: %{type: :bang}}}, _) do
- url = LSGWeb.Router.Helpers.irc_url(LSGWeb.Endpoint, :index, m.network, LSGWeb.format_chan(m.channel))
+ url = NolaWeb.Router.Helpers.irc_url(NolaWeb.Endpoint, :index, m.network, NolaWeb.format_chan(m.channel))
m.replyfun.("-> #{url}")
{:noreply, nil}
end
@@ -111,12 +111,12 @@ defmodule LSG.IRC.BasePlugin do
def handle_info({:irc, :trigger, "version", message = %{trigger: %{type: :bang}}}, _) do
{:ok, vsn} = :application.get_key(:lsg, :vsn)
ver = List.to_string(vsn)
- url = LSGWeb.Router.Helpers.irc_url(LSGWeb.Endpoint, :index)
+ url = NolaWeb.Router.Helpers.irc_url(NolaWeb.Endpoint, :index)
elixir_ver = Application.started_applications() |> List.keyfind(:elixir, 0) |> elem(2) |> to_string()
otp_ver = :erlang.system_info(:system_version) |> to_string() |> String.trim()
system = :erlang.system_info(:system_architecture) |> to_string()
message.replyfun.([
- <<"🤖 I am a robot running", 2, "beautte, version #{ver}", 2, " — source: #{LSG.source_url()}">>,
+ <<"🤖 I am a robot running", 2, "beautte, version #{ver}", 2, " — source: #{Nola.source_url()}">>,
"🦾 Elixir #{elixir_ver} #{otp_ver} on #{system}",
"👷‍♀️ Owner: href <href@random.sh>",
"🌍 Web interface: #{url}"