From bb8ebca0b8ca480e5b4c86ef4005e336b1d118f9 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Thu, 16 Jul 2020 18:00:43 -0700 Subject: [PATCH] IRC messages are not routed if they are sent by the bot Signed-off-by: Alek Ratzloff --- lib/irc/irc.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/irc/irc.ex b/lib/irc/irc.ex index f419adb..e06d393 100644 --- a/lib/irc/irc.ex +++ b/lib/irc/irc.ex @@ -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