def receive_msg(self) -> Union[(str, List[str])]:
    self._irc_socket.setblocking(False)
    ready = select.select([self._irc_socket], [], [], self._socket_timeout)
    ircmsg = ''
    if ready[0]:
        try:
            ircmsg = self._irc_socket.recv(2048).decode('UTF-8')
        except (OSError, UnicodeDecodeError) as e:
            log.error(e)
            return 'ERROR'
    ircmsgs = ircmsg.split('\r\n')
    if ((len(ircmsgs) > 1) and (not ircmsgs[(len(ircmsgs) - 1)])):
        del ircmsgs[(len(ircmsgs) - 1)]
    sepmsg = 'ircmsg:'
    for ircmsg in ircmsgs:
        log.info('%s %s', sepmsg, ('-' * ((self._tc - len(sepmsg)) - 30)))
        log.info(ircmsg)
    self._irc_socket.setblocking(True)
    return ircmsgs
def receive_msg(self) -> Union[(str, List[str])]:
    self._irc_socket.setblocking(False)
    ready = select.select([self._irc_socket], [], [], self._socket_timeout)
    ircmsg = 
    if ready[0]:
        try:
            ircmsg = self._irc_socket.recv(2048).decode('UTF-8')
        except (OSError, UnicodeDecodeError) as e:
            log.error(e)
            return 'ERROR'
    ircmsgs = ircmsg.split('\r\n')
    if ((len(ircmsgs) > 1) and (not ircmsgs[(len(ircmsgs) - 1)])):
        del ircmsgs[(len(ircmsgs) - 1)]
    sepmsg = 'ircmsg:'
    for ircmsg in ircmsgs:
        log.info('%s %s', sepmsg, ('-' * ((self._tc - len(sepmsg)) - 30)))
        log.info(ircmsg)
    self._irc_socket.setblocking(True)
    return ircmsgs