From 46b9c52f9ca28834490a385b0a4ba066fb18be04 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Sun, 1 Sep 2024 17:37:28 -0700 Subject: [PATCH] Add check to see if prefix is None in on_message This was causing crashes, I'm not sure why prefix is coming back empty Signed-off-by: Alek Ratzloff --- omnibot/bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/omnibot/bot.py b/omnibot/bot.py index 450447b..c6abeee 100644 --- a/omnibot/bot.py +++ b/omnibot/bot.py @@ -190,6 +190,8 @@ class Bot: log.trace("%s", message) channel = message.parameters[0] who = message.prefix + if not who: + return if who.nick == self.server_config.nick: # Don't raise on_message events for ourselves return