Add protection for a channel with +zm

This commit is contained in:
Rampoina 2021-07-12 18:01:32 +02:00
parent 7eab8aaeb0
commit df9496e43c
1 changed files with 2 additions and 2 deletions

4
bot.py
View File

@ -29,9 +29,9 @@ class Server(BaseServer):
print("Line Params: ", line.params)
if "PRIVMSG" in line.command and any(channel in line.params[0] for channel in self.params.autojoin):
chan = self.channels[line.params[0]].name
chan = self.channels[line.params[0].lstrip("@")].name
if line.params[1].startswith(".match"):
channel = self.channels[line.params[0]]
channel = self.channels[line.params[0].lstrip("@")]
if len(line.params[1].split(" ")) < 2:
await self.send(build("PRIVMSG", [chan, "ERROR: game not specified"]))
else: