(3.4d) Some commands can be externalized:
- allies (CPEnableAllies)
- enemies (CPEnableEnemies)
- give (CPEnableGive)
- refit (CPEnableRefit)
- remote (CPEnableRemote)
- show (CPEnableShow)
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 happily expanded into 7: allies: b c. Your program must cope with that. After all, the player could as well have used the normal xtern command to write this line manually.