Change message routing logic to be an implication instead of AND
Previously, a message wouldn't be admitted if it didn't have a prefix, (logical) AND if the message was equal to the bot's nickname. Now, a message with a blank prefix passes through, but if the prefix is the bot's nickname, it does not. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -77,7 +77,7 @@ defmodule Omnibot.Irc do
|
||||
msg = Msg.parse(line)
|
||||
|
||||
# Send the message to the router
|
||||
if msg.prefix && (msg.prefix.nick != State.cfg().nick) do
|
||||
if (!msg.prefix) || (msg.prefix.nick != State.cfg().nick) do
|
||||
route_msg(self(), msg)
|
||||
end
|
||||
{:noreply, socket}
|
||||
|
||||
Reference in New Issue
Block a user