

def lineReceived(self, line):
    '\n        IMC2 -> Evennia\n\n        Triggered when text is received from the IMC2 network. Figures out\n        what to do with the packet. This deals with the following\n\n        Args:\n            line (str): Incoming text.\n\n        '
    line = line.strip()
    if (not self.is_authenticated):
        self._imc_login(line)
        return
    packet = pck.IMC2Packet(self.mudname, packet_str=line)
    if (packet.packet_type == 'is-alive'):
        self.imc2_mudlist.update_mud_from_packet(packet)
    elif (packet.packet_type == 'keepalive-request'):
        self.send_packet(pck.IMC2PacketIsAlive())
    elif (packet.packet_type == 'ice-msg-b'):
        self.data_out(text=line, packettype='broadcast')
    elif (packet.packet_type == 'whois-reply'):
        self._whois_reply(packet)
    elif (packet.packet_type == 'close-notify'):
        self.imc2_mudlist.remove_mud_from_packet(packet)
    elif (packet.packet_type == 'ice-update'):
        self.imc2_chanlist.update_channel_from_packet(packet)
    elif (packet.packet_type == 'ice-destroy'):
        self.imc2_chanlist.remove_channel_from_packet(packet)
    elif (packet.packet_type == 'tell'):
        pass

dataset/ETHPy150Open evennia/evennia/evennia/server/portal/imc2.py IMC2Bot.lineReceived/original