From 50a00a77982aa2442fb31825ef3631ab56908591 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 30 Jan 2022 09:03:47 +0000 Subject: [PATCH] Fix bug in IRC with zero length messages --- handler/irc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/handler/irc.py b/handler/irc.py index 8cd3dd6..57fb208 100644 --- a/handler/irc.py +++ b/handler/irc.py @@ -160,8 +160,10 @@ class IRCBot(irc.IRCClient): self.parse(user, host, channel, msg[1:]) elif host in self.admins and channel == nick: if len(msg) > 0: - if msg.split()[0] != "!": - self.parse(user, host, channel, msg) + spl = msg.split() + if len(spl) > 0: + if spl[0] != "!": + self.parse(user, host, channel, msg) def noticed(self, user, channel, msg): """