dont send messages while not connected lol

This commit is contained in:
lickthecheese 2020-10-06 15:23:53 -04:00 committed by xfnw
parent 4a87ce81f0
commit a5a9825965
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -36,7 +36,7 @@ class Server(BaseServer):
async def line_send(self, line: Line):
print(f"{self.name} > {line.format()}")
async def bc(self,name,nick,msg):
if name == self.name:
if name == self.name or "chan" not in list(dir(self)):
return
await self.send(build("PRIVMSG",[self.chan,"<"+nick+"@"+name+"> "+msg]))