summaryrefslogtreecommitdiff
path: root/lib/lsg_irc/seen_plugin.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsg_irc/seen_plugin.ex')
-rw-r--r--lib/lsg_irc/seen_plugin.ex7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/lsg_irc/seen_plugin.ex b/lib/lsg_irc/seen_plugin.ex
index 8b2178f..f1a5473 100644
--- a/lib/lsg_irc/seen_plugin.ex
+++ b/lib/lsg_irc/seen_plugin.ex
@@ -7,12 +7,13 @@ defmodule LSG.IRC.SeenPlugin do
def irc_doc, do: @moduledoc
def start_link() do
- GenServer.start_link(__MODULE__, [])
+ GenServer.start_link(__MODULE__, [], name: __MODULE__)
end
def init([]) do
- {:ok, _} = Registry.register(IRC.PubSub, "triggers", [])
- {:ok, _} = Registry.register(IRC.PubSub, "message", [])
+ regopts = [plugin: __MODULE__]
+ {:ok, _} = Registry.register(IRC.PubSub, "triggers", regopts)
+ {:ok, _} = Registry.register(IRC.PubSub, "message", regopts)
dets_filename = (LSG.data_path() <> "/seen.dets") |> String.to_charlist()
{:ok, dets} = :dets.open_file(dets_filename, [])
{:ok, %{dets: dets}}