split

Olympia: The Age of Gods PBEM (Oct 4 2000)

## `split`

      split bytes lines
      * time: 0 days
      * priority: 1

Split large turn reports before mailing them.

Some mail networks and online services have restrictions on how large an email message may be. Some typical limits which may be encountered are 5,000 lines, 50k, and 64k. Since Olympia turn reports can be arbitrarily large, players with such restrictions on their incoming email may have trouble getting their reports. Reports may be truncated, or not delivered at all.

The `split` order asks Olympia to divide turn reports into several pieces before mailing them. The `lines` parameter, if nonzero, gives a maximum number of lines to allow in a turn report section. The `bytes` parameter, if nonzero, gives a maximum number of bytes to allow in a turn report section. Reports will be split at the first of these limits reached.

Note that headers added by the operating system add to the size of a message after it has been mailed. Leaving 2000 bytes or 20 lines leeway before your desired limit is a good idea.

For example, suppose your incoming messages are truncated at 50k bytes. Issue the order:

      split 0 48000

This will cause messages to be split after the first 48,000 bytes. Lines are ignored for the purposes of splitting.

If your messages are rejected if they are larger than 64k or 5,000 lines, whichever is less, issue the order:

      split 4980 62000	# note 20 line / 2000 byte margin

To turn off report splitting, issue the order:

      split 0 0

Reports will be split on line boundaries (lines will not be split in the middle). "[part n of total]" will be added to the Subject: line of each section. For example,

      Subject: Olympia turn 1 report [part 1 of 3]

The SPLIT order is parsed by the order scanner, so it takes effect immediately, rather than when the next turn runs. Suppose you received a turn report which was truncated because of a mail size limit of 32k. You could request a resend of your turn report, split into sections, with the following message to the order scanner:

      begin <your player id>
      split 0 30000		# split at 32k, with 2k leeway
      resend			# resend my last report to me