Extend lua print()
Posted: Fri Oct 06, 2023 2:34 pm
Hello,
I currently have the following setup:
A Factorio server that prints out to stdout via lua print and a backend server that reads the stdout, processes it and delivers the result back to the server either via a silent-command or rcon.
But to spare all the connected players and the unneccessary messages via print that really shouldn't reach them, I was wondering if the lua print could be extended with a parameter that would allow one to specify to what client to send this message to.
This would allow me to print messages only to the servers stdout that the backend can parse and would stop the unneccessary messages to all the connected clients.
This can also be used for other scenarios where you intend to only print information to the servers console but wouldn't want to print it to all the connected clients.
Thank you in advance,
/Gerkiz
I currently have the following setup:
A Factorio server that prints out to stdout via lua print and a backend server that reads the stdout, processes it and delivers the result back to the server either via a silent-command or rcon.
But to spare all the connected players and the unneccessary messages via print that really shouldn't reach them, I was wondering if the lua print could be extended with a parameter that would allow one to specify to what client to send this message to.
This would allow me to print messages only to the servers stdout that the backend can parse and would stop the unneccessary messages to all the connected clients.
This can also be used for other scenarios where you intend to only print information to the servers console but wouldn't want to print it to all the connected clients.
Thank you in advance,
/Gerkiz