code: def construct(self, force=False):
          command = str(self.command)
          if not protocol.COMMAND_PATTERN.match(command) and not force:
              raise pydle.protocol.ProtocolViolation('The constructed command does not follow the command pattern ({pat})'.format(pat=protocol.COMMAND_PATTERN.pattern), message=command)
          message = command.upper()
          if not self.params:
              message += ' '
          for idx, param in enumerate(self.params):
              if not param or ' ' in param or param[0] == ':':
                  if idx + 1 < len(self.params) and not force:
                      raise pydle.protocol.ProtocolViolation('Only the final parameter of an IRC message can be trailing and thus contain spaces, or start with a colon.', message=param)
                  message += ' ' + protocol.TRAILING_PREFIX + param
              else:
                  message += ' ' + param
          if self.source:
              message = ':' + self.source + ' ' + message
          if any(ch in message for ch in protocol.FORBIDDEN_CHARACTERS) and not force:
              raise pydle.protocol.ProtocolViolation('The constructed message contains forbidden characters ({chs}).'.format(chs=', '.join(protocol.FORBIDDEN_CHARACTERS)), message=message)
          message += protocol.LINE_SEPARATOR
          if len(message) > protocol.MESSAGE_LENGTH_LIMIT and not force:
              raise pydle.protocol.ProtocolViolation('The constructed message is too long. ({len} > {maxlen})'.format(len=len(message), maxlen=protocol.MESSAGE_LENGTH_LIMIT), message=message)
          return message