diff options
Diffstat (limited to '')
-rw-r--r-- | lib/lsg_irc/txt_plugin.ex | 10 | ||||
-rw-r--r-- | lib/lsg_irc/txt_plugin/markov.ex | 2 | ||||
-rw-r--r-- | lib/lsg_irc/txt_plugin/markov_native.ex | 4 | ||||
-rw-r--r-- | lib/lsg_irc/txt_plugin/markov_py_markovify.ex | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/lsg_irc/txt_plugin.ex b/lib/lsg_irc/txt_plugin.ex index 2c9dfca..d2bb627 100644 --- a/lib/lsg_irc/txt_plugin.ex +++ b/lib/lsg_irc/txt_plugin.ex @@ -1,4 +1,4 @@ -defmodule LSG.IRC.TxtPlugin do +defmodule Nola.IRC.TxtPlugin do alias IRC.UserTrack require Logger @@ -53,9 +53,9 @@ defmodule LSG.IRC.TxtPlugin do end def init([]) do - dets_locks_filename = (LSG.data_path() <> "/" <> "txtlocks.dets") |> String.to_charlist + dets_locks_filename = (Nola.data_path() <> "/" <> "txtlocks.dets") |> String.to_charlist {:ok, locks} = :dets.open_file(dets_locks_filename, []) - markov_handler = Keyword.get(Application.get_env(:lsg, __MODULE__, []), :markov_handler, LSG.IRC.TxtPlugin.Markov.Native) + markov_handler = Keyword.get(Application.get_env(:lsg, __MODULE__, []), :markov_handler, Nola.IRC.TxtPlugin.Markov.Native) {:ok, markov} = markov_handler.start_link() {:ok, _} = Registry.register(IRC.PubSub, "triggers", [plugin: __MODULE__]) {:ok, %__MODULE__{locks: locks, markov_handler: markov_handler, markov: markov, triggers: load()}} @@ -303,9 +303,9 @@ defmodule LSG.IRC.TxtPlugin do {trigger, _} = clean_trigger(trigger) if Map.get(state.triggers, trigger) do url = if m.channel do - LSGWeb.Router.Helpers.irc_url(LSGWeb.Endpoint, :txt, m.network, LSGWeb.format_chan(m.channel), trigger) + NolaWeb.Router.Helpers.irc_url(NolaWeb.Endpoint, :txt, m.network, NolaWeb.format_chan(m.channel), trigger) else - LSGWeb.Router.Helpers.irc_url(LSGWeb.Endpoint, :txt, trigger) + NolaWeb.Router.Helpers.irc_url(NolaWeb.Endpoint, :txt, trigger) end m.replyfun.("-> #{url}") end diff --git a/lib/lsg_irc/txt_plugin/markov.ex b/lib/lsg_irc/txt_plugin/markov.ex index 311138c..2e30dfa 100644 --- a/lib/lsg_irc/txt_plugin/markov.ex +++ b/lib/lsg_irc/txt_plugin/markov.ex @@ -1,4 +1,4 @@ -defmodule LSG.IRC.TxtPlugin.Markov do +defmodule Nola.IRC.TxtPlugin.Markov do @type state :: any() @callback start_link() :: {:ok, state()} diff --git a/lib/lsg_irc/txt_plugin/markov_native.ex b/lib/lsg_irc/txt_plugin/markov_native.ex index 524e860..4c403c2 100644 --- a/lib/lsg_irc/txt_plugin/markov_native.ex +++ b/lib/lsg_irc/txt_plugin/markov_native.ex @@ -1,5 +1,5 @@ -defmodule LSG.IRC.TxtPlugin.MarkovNative do - @behaviour LSG.IRC.TxtPlugin.Markov +defmodule Nola.IRC.TxtPlugin.MarkovNative do + @behaviour Nola.IRC.TxtPlugin.Markov def start_link() do ExChain.MarkovModel.start_link() diff --git a/lib/lsg_irc/txt_plugin/markov_py_markovify.ex b/lib/lsg_irc/txt_plugin/markov_py_markovify.ex index a3838cd..cda7853 100644 --- a/lib/lsg_irc/txt_plugin/markov_py_markovify.ex +++ b/lib/lsg_irc/txt_plugin/markov_py_markovify.ex @@ -1,4 +1,4 @@ -defmodule LSG.IRC.TxtPlugin.MarkovPyMarkovify do +defmodule Nola.IRC.TxtPlugin.MarkovPyMarkovify do def start_link() do {:ok, nil} @@ -18,7 +18,7 @@ defmodule LSG.IRC.TxtPlugin.MarkovPyMarkovify do defp run(args \\ []) do {binary, script} = script() - args = [script, Path.expand(LSG.IRC.TxtPlugin.directory()) | args] + args = [script, Path.expand(Nola.IRC.TxtPlugin.directory()) | args] IO.puts "Args #{inspect args}" case MuonTrap.cmd(binary, args) do {response, 0} -> response @@ -28,7 +28,7 @@ defmodule LSG.IRC.TxtPlugin.MarkovPyMarkovify do defp script() do default_script = to_string(:code.priv_dir(:lsg)) <> "/irc/txt/markovify.py" - env = Application.get_env(:lsg, LSG.IRC.TxtPlugin, []) + env = Application.get_env(:lsg, Nola.IRC.TxtPlugin, []) |> Keyword.get(:py_markovify, []) {Keyword.get(env, :python, "python3"), Keyword.get(env, :script, default_script)} |