def disconnect(self):
        if self.clientConnection:
            if self.clientConnection.state == 'disconnected':
                self.clientConnection = None
                self._registered = False
                self.peerUsers = None
            else:
                self.clientConnection.disconnect()
                # reactor.callFromThread(self.clientConnection.disconnect)
                self.logger.info('Disconnected from %s' % self.host)
                status_bar.status_message('disconnected from %s' % self.str())
            self.clientConnection = None
        self._registered = False
        self.peerUsers = None
        self.unverifiedUsers = None
Disconnect from the instant messaging server.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/sub_collab/negotiator/irc.py/IRCNegotiator.disconnect