You can now execute console commands on servers while they're running by writing lines to the file ~Altitude/servers/command.txt
Example: change the server running on port 27275's current map to ffa_cave
echo 27275,console,changeMap ffa_cave>> ~Altitude/servers/command.txt
Added support for custom voteable commands (edit ~Altitude/servers/launcher_config.xml to define custom commands)
Example: add a 'startLadder' command that requires 60% yes votes to pass:
Open ~Altitude/servers/launcher_config.xml with a text editor
For each server you'd like to modify, replace the line "<customCommands />" (or add a line just before <consoleCommandPermissions> if you're using an outdated config file) with:
Code:
<customCommands>
<CustomCommandDescriptor name="startLadder" votePassPercentage="60" />
</customCommands>
You can then set up custom code to monitor the log file and respond to the custom command, for example when a line like this appears in ~Altitude/servers/log.txt:
Code:
{"command":"startLadder","type":"customCommand","time":20428,"port":27275}
(Note: your script should use a JSON-compliant parser to discover type=customCommand, command=startLadder, port=27275)
You can run custom code to initiate other events, for example show a message, balance teams, start a tournament, and change to a randomly selected map:
Code:
echo 27275,console,serverMessage Initiating ladder game, leavers will be banned>> ~Altitude/servers/command.txt
echo 27275,console,balanceTeams>> ~Altitude/servers/command.txt
echo 27275,console,startTournament>> ~Altitude/servers/command.txt
echo 27275,console,changeMap tbd_core>> ~Altitude/servers/command.txt