dont send to disconnected

This commit is contained in:
vulpine 2020-10-13 11:33:10 -04:00
parent 3657fbd8d2
commit 0f0c270e2a
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -64,7 +64,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 not self.disconnected and name == self.name or "chan" not in list(dir(self)):
if self.disconnected or name == self.name or "chan" not in list(dir(self)):
return
await self.send(build("PRIVMSG",[self.chan,"<"+nick+"@"+name+"> "+msg]))