Fix notice bug

This bug would make the bot react to anything that had PRIVMSG, the
channel, and a command; even if it actually wasn't a PRIVMSG.
This commit is contained in:
Ultracoolguy 2020-11-15 11:56:01 -04:00
parent 853ddf8303
commit c5d7e1deb9
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -32,7 +32,7 @@ class Server(BaseServer):
print(f"connected to {self.isupport.network}")
await self.send(build("JOIN", [chan]))
elif "PRIVMSG" in line.format() and chan in line.format():
elif "PRIVMSG" in line.command and chan in line.params[0]:
user = line.source.split('!')[0]
if line.params[1].startswith(".matchmake"):