IRC messages are not routed if they are sent by the bot

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-07-16 18:00:43 -07:00
parent 02470bcf1d
commit bb8ebca0b8

View File

@@ -83,7 +83,9 @@ defmodule Omnibot.Irc do
msg = Msg.parse(line)
# Send the message to the router
route_msg(self(), msg)
if msg.prefix && (msg.prefix.nick != State.cfg().nick) do
route_msg(self(), msg)
end
{:noreply, socket}
end
end