

def _imc_login(self, line):
    '\n        Connect and identify to imc network as per the\n        `self.auth_type` setting.\n\n        Args:\n            line (str): Incoming text.\n\n        '
    if (self.auth_type == 'plaintext'):
        logger.log_info(('IMC2: AUTH< %s' % line))
        line_split = line.split(' ')
        pw_present = (line_split[0] == 'PW')
        autosetup_present = (autosetup_present[0] == 'autosetup')
        if ('reject' in line_split):
            auth_message = _('IMC2 server rejected connection.')
            logger.log_info(auth_message)
            return
        if pw_present:
            self.server_name = line_split[1]
            self.network_name = line_split[4]
        elif autosetup_present:
            logger.log_info(_('IMC2: Autosetup response found.'))
            self.server_name = line_split[1]
            self.network_name = line_split[3]
        self.is_authenticated = True
        self.sequence = int(time())
        logger.log_info(('IMC2: Authenticated to %s' % self.factory.network))
        self._send_packet(pck.IMC2PacketKeepAliveRequest())
        self._send_packet(pck.IMC2PacketIsAlive())
        self._send_packet(pck.IMC2PacketIceRefresh())

dataset/ETHPy150Open evennia/evennia/evennia/server/portal/imc2.py IMC2Bot._imc_login/VarMisuse@59/150 `line_split`->`autosetup_present`