From 0f0c270e2ae7176c0dd62680ef9a24ea85a4fe8d Mon Sep 17 00:00:00 2001 From: xfnw Date: Tue, 13 Oct 2020 11:33:10 -0400 Subject: [PATCH] dont send to disconnected --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 832a6d2..a34c4fe 100755 --- a/bot.py +++ b/bot.py @@ -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]))