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 <alekratz@gmail.com>
This commit is contained in:
2024-09-01 17:37:28 -07:00
parent c051ada8b8
commit 46b9c52f9c

View File

@@ -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