Replace all other State.cfg/0 in favor of Irc.cfg/1

State.cfg/0 should be removed from the codebase by this point. Should be
safe to remove.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-08-11 12:52:37 -07:00
parent 6110420015
commit 2dc7bbd94d
4 changed files with 10 additions and 8 deletions

View File

@@ -42,9 +42,10 @@ defmodule Omnibot.Plugin.Base do
defp route_msg(irc, msg) do
nick = msg.prefix.nick
cfg = Omnibot.Irc.cfg(irc)
case String.upcase(msg.command) do
"PRIVMSG" ->
if (!msg.prefix) || (msg.prefix.nick != Omnibot.State.cfg().nick) do
if (!msg.prefix) || (msg.prefix.nick != cfg.nick) do
[channel | params] = msg.params
line = Enum.join(params, " ")