dont send messages while not connected lol

This commit is contained in:
lickthecheese 2020-10-06 15:23:53 -04:00
parent cdd76f00f2
commit 7beab6babb
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -35,7 +35,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]))