Fix bug in IRC with zero length messages

This commit is contained in:
Mark Veidemanis 2022-01-30 09:03:47 +00:00
parent bac6f26311
commit 50a00a7798
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 4 additions and 2 deletions

View File

@ -160,7 +160,9 @@ class IRCBot(irc.IRCClient):
self.parse(user, host, channel, msg[1:]) self.parse(user, host, channel, msg[1:])
elif host in self.admins and channel == nick: elif host in self.admins and channel == nick:
if len(msg) > 0: if len(msg) > 0:
if msg.split()[0] != "!": spl = msg.split()
if len(spl) > 0:
if spl[0] != "!":
self.parse(user, host, channel, msg) self.parse(user, host, channel, msg)
def noticed(self, user, channel, msg): def noticed(self, user, channel, msg):