

def data_out(self, text=None, **kwargs):
    '\n        Evennia -> IMC2.\n\n        Kwargs:\n           text (str): Outgoing text.\n           packet_type (str):\n                - broadcast: Send to everyone on IMC channel.\n                - tell: Send a tell (see target keyword).\n                - whois: Get whois information (see target keyword).\n           sender (str): Used by tell to identify the mud sending.\n           target (str): Key identifier of target to tells or whois. If not\n               given "Unknown" will be used.\n          destination (str): Used by tell to specify mud\n            destination to send to.\n\n        '
    if self.sequence:
        self.sequence += 1
    packet_type = kwargs.get('packet_type', 'imcbroadcast')
    if (packet_type == 'broadcast'):
        if text.startswith('bot_data_out'):
            text = text.split(' ', 1)[1]
        else:
            return
        if (':' in text):
            (header, message) = [part.strip() for part in part.split(':', 1)]
        self._send_packet(pck.IMC2PacketIceMsgBroadcasted(self.servername, self.channel, header, text))
    elif (packet_type == 'tell'):
        sender = kwargs.get('sender', self.mudname)
        target = kwargs.get('target', 'Unknown')
        destination = kwargs.get('destination', 'Unknown')
        self._send_packet(pck.IMC2PacketTell(sender, target, destination, text))
    elif (packet_type == 'whois'):
        sender = kwargs.get('sender', self.mudname)
        target = kwargs.get('target', 'Unknown')
        self._send_packet(pck.IMC2PacketWhois(sender, target))

dataset/ETHPy150Open evennia/evennia/evennia/server/portal/imc2.py IMC2Bot.data_out/VarMisuse@109/351 `text`->`part`