Have freeciv-server integrated lua script engine, but not related to ruleset? I ask to run script written by someone with hack access, which server would execute on some event. I must tell idea about simpleparser make me invented idea about not-ruleset-related-scripting.
For what it could been used? That's the answer:
1) Send scripts to vote by players, like currently some options can be voted. Because not everybody are developer, so simpeparser could be helpful.
2) Debugging server
Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
2 posts • Page 1 of 1
The FCDB stuff is for server operators (user management with SQLite and other databases.)Lachu wrote:Have freeciv-server integrated lua script engine, but not related to ruleset?
AFAIK the Lua IO and OS libraries are not available, otherwise you can start scripts or Lua one-line commands on the server command line (server command /lua, maybe this needs hack access rights):
/lua cmd line runs a one-line script, /lua file name runs name.lua, and just for fun I created a file .lua in the data path started with /lua file consisting of two lines:
Code: Select all
notify.event( nil, nil, E.CHAT_MSG, '[c fg="#006400"].lua: %s with %s[/c]', fc_version(), _VERSION )
Also see the examples on the Wiki, but I fear it doesn't help for your ideas.