From 3faba571382532532f6daa570c9df39a5bda976b Mon Sep 17 00:00:00 2001 From: secret_online Date: Sun, 24 Jan 2016 09:17:35 +1300 Subject: Add config option for RCON delay --- config.json | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 48778d3..07e3895 100644 --- a/config.json +++ b/config.json @@ -9,5 +9,6 @@ "WEBHOOK": "/minecraft/hook", "REGEX_MATCH_CHAT_MC": "\\[Server thread/INFO\\]: <(.*)> (.*)", "REGEX_IGNORED_CHAT": "packets too frequently", + "RCON_RECONNECT_DELAY": 10, "DEBUG": false } \ No newline at end of file diff --git a/index.js b/index.js index fba3da4..7a288f8 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,7 @@ client.on("auth", function() { client.disconnect(); setTimeout(function() { client.connect(); - }, 10000); + }, c.RCON_RECONNECT_DELAY * 1000); }); client.connect(); -- cgit 1.4.1