code: def construct_ctcp(*parts):
      
      message = ' '.join(parts)
      message = message.replace('\0', CTCP_ESCAPE_CHAR + '0')
      message = message.replace('\n', CTCP_ESCAPE_CHAR + 'n')
      message = message.replace('\r', CTCP_ESCAPE_CHAR + 'r')
      message = message.replace(CTCP_ESCAPE_CHAR, CTCP_ESCAPE_CHAR + CTCP_ESCAPE_CHAR)
      return CTCP_DELIMITER + message + CTCP_DELIMITER
docs: Construct CTCP message.