(3.4d) Some commands can be externalized:

To externalize a command, set the corresponding configuration option to External. When PHost receives such a command, it will not execute it itself; it will instead write it to xterncmd.ext. An add-on program can then read the command, and execute it. Such an add-on program can enforce a variety of restrictions or add new functionality without requiring the players to talk to the add-on directly.

For example, when player 7 gives the command a add 3, PHost will write the following to xterncmd.ext:

7: allies: add 3

Note how PHost has expanded the first word, and added a colon. PHost does not validate the command (apart from checking the first word). a b c is expanded into 7: allies: b c. Your program must therefore be prepared to handle invalid arguments. After all, the player could as well have used the normal xtern command to write invalid commands into xterncmd.ext.

This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.