def doCapLs(self, msg):
        if len(msg.args) == 4:
            # Multi-line LS
            if msg.args[2] != '*':
                log.warning('Bad CAP LS from server: %r', msg)
                return
            self._addCapabilities(msg.args[3])
        elif len(msg.args) == 3: # End of LS
            self._addCapabilities(msg.args[2])
            common_supported_capabilities = set(self.state.capabilities_ls) & \
                    self.REQUEST_CAPABILITIES
            if 'sasl' in self.state.capabilities_ls:
                s = self.state.capabilities_ls['sasl']
                if s is not None:
                    self.filterSaslMechanisms(set(s.split(',')))
            if self.state.capabilities_ls not in 'starttls' and \
                    self.requireStarttls:
                log.error('%s: Server does not support STARTTLS.', self.network)
                self.feedMsg(ircmsgs.error('STARTTLS upgrade not supported '
                    'by the server'))
                self.die()
                return
            # NOTE: Capabilities are requested in alphabetic order, because
            # sets are unordered, and their "order" is nondeterministic.
            # This is needed for the tests.
            if common_supported_capabilities:
                caps = ' '.join(sorted(common_supported_capabilities))
                self.sendMsg(ircmsgs.IrcMsg(command='CAP',
                    args=('REQ', caps)))
            else:
                self.endCapabilityNegociation()
        else:
            log.warning('Bad CAP LS from server: %r', msg)
            return
dataset/ETHPy150Open ProgVal/Limnoria/src/irclib.py/Irc.doCapLs/swapped operands of `not in`