From 6a6a00412a6729671e7f3c562562f949d51fa43d Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Fri, 30 Aug 2024 10:00:23 -0700 Subject: [PATCH] Fix message parameters edge case Sometimes an incoming message won't have any content (for some reason). I haven't looked too deeply into the origins of it. This just bypasses that case and returns early. 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 e27c0b5..123145b 100644 --- a/omnibot/bot.py +++ b/omnibot/bot.py @@ -193,6 +193,8 @@ class Bot: if who.nick == self.server_config.nick: # Don't raise on_message events for ourselves return + if len(message.paremeters) == 1: + return line = message.parameters[1] # TL;DR OF THE BELOW: if the first parameter looks like a channel in