mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Add option to throw on non-empty RCON responses
Add option to FactorioServer.sendRcon to throw on non-empty responses from Factorio. This is useful for detecting errors returned by commands that should not have a response.
This commit is contained in:
1 parent
f88e1f1d3a
commit
221dc855f4
3 files changed
+17
-3
No files matched your search
@@ -34,7 +34,7 @@ class InstancePlugin extends plugin.BaseInstancePlugin {
|
||||
async chatEventHandler(message) {
|
||||
// TODO check if cross server chat is enabled
|
||||
let content = `[${message.data.instance_name}] ${removeTags(message.data.content)}`;
|
||||
await this.instance.server.sendRcon(`/sc game.print('${escapeLuaString(content)}')`);
|
||||
await this.instance.server.sendRcon(`/sc game.print('${escapeLuaString(content)}')`, true);
|
||||
}
|
||||
|
||||
async onOutput(output) {
|
||||
|
||||
Reference in new issue
Block a user