for u in chan.users:
if u.nick != self.nick:
self._clientLeft(u.nick, chan)
+ if chan.deleting:
+ chan.bot.chans.remove(chan)
+ del self.parent.chans[chan.name.lower()]
+ del chan
else:
user = self.parent.user(nick)
gone = user.part(chan)
self.parent.log('X', line)
def _write(self, line):
- self.socket.sendall(line.encode('utf-8', 'backslashreplace')+b"\r\n")
+ self.socket.sendall(line.encode('utf-8', 'surrogateescape')+b"\r\n")
def _getsockerr(self):
try: # SO_ERROR might not exist on all platforms