longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
214 stars 39 forks source link

Run arbitrary (server) commands from lua privileged contexts #2281

Open lmoureaux opened 2 months ago

lmoureaux commented 2 months ago

Is your feature request related to a problem? Please describe. Sometimes we want to automate things that can be done from the command line but Lua doesn't have an API for.

Describe the solution you'd like Add server-side Lua API to run a server command. Retrieving the results is out of the scope of this feature.

Describe alternatives you've considered Adding Lua APIs for all commands. Sounds more difficult.

Additional context Might help solve #1599.