'Called just before user is disconnected.
Args:
reason (str, optional): The reason given for the disconnect,
(echoed to the connection channel by default).'

def at_disconnect(self, reason=None):

    reason = ((reason and ('(%s)' % reason)) or '')
    self._send_to_connect_channel(('|R%s    disconnected    %s|n' % (self.key, reason)))
