summary refs log tree commit diff homepage
path: root/index.js
diff options
context:
space:
mode:
authordestruc7i0n <destruc7i0n@users.noreply.github.com>2016-01-12 10:48:35 -0500
committerColin D'Souza <dscdsouza@outlook.com>2016-01-12 21:14:49 -0500
commitcbc290ca97f9d2b308cd21e78bcab09c191e3c17 (patch)
treea1a995908c5f689f16af18522221b2cafab182e4 /index.js
parentUpdate README.md (diff)
downloadshulker-cbc290ca97f9d2b308cd21e78bcab09c191e3c17.tar.gz
shulker-cbc290ca97f9d2b308cd21e78bcab09c191e3c17.zip
Update index.js
Diffstat (limited to '')
-rw-r--r--index.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/index.js b/index.js
index 86a4788..551351b 100644
--- a/index.js
+++ b/index.js
@@ -12,17 +12,13 @@ var d2m = new Discord.Client();
 var client = new Rcon(c.MINECRAFT_SERVER_RCON_IP, c.MINECRAFT_SERVER_RCON_PORT, c.MINECRAFT_SERVER_RCON_PASSWORD);
 
 client.on("auth", function() {
-    if(debug) {
-        console.log("[DEBUG] Authenticated with "+c.MINECRAFT_SERVER_RCON_IP+":"+c.MINECRAFT_SERVER_RCON_PORT);
-    }
+    console.log("[INFO] Authenticated with "+c.MINECRAFT_SERVER_RCON_IP+":"+c.MINECRAFT_SERVER_RCON_PORT);
 }).on("response", function(str) {
     if(debug && str) {
         console.log("[DEBUG] Got response: " + str);
     }
 }).on("end", function() {
-    if(debug) {
-        console.log("[DEBUG] Rcon closed!");
-    }
+    console.log("[INFO] Rcon closed!");
 });
 
 client.connect();
@@ -44,9 +40,7 @@ d2m.on("ready", function() {
     var channel = d2m.channels.get("name", c.DISCORD_CHANNEL).id; 
     app.post(c.WEBHOOK, function(request, response){
         body = request.rawBody;
-        if(debug) {
-            console.log("[DEBUG] Recieved "+body);  
-        }
+        console.log("[INFO] Recieved "+body);  
         re = new RegExp(c.REGEX_MATCH_CHAT_MC);
         ignored = new RegExp(c.REGEX_IGNORED_CHAT);
         if(!ignored.test(body)) {
@@ -75,10 +69,10 @@ var ipaddress = process.env.OPENSHIFT_NODEJS_IP || process.env.IP || "127.0.0.1"
 var serverport = process.env.OPENSHIFT_NODEJS_PORT || process.env.PORT || c.PORT;
 if (process.env.OPENSHIFT_NODEJS_IP !== undefined) {
     http.listen( serverport, ipaddress, function() {
-        console.log("[DEBUG] Bot listening on *:" + serverport);
+        console.log("[INFO] Bot listening on *:" + serverport);
     });
 } else {
     http.listen( serverport, function() {
-        console.log("[DEBUG] Bot listening on *:" + c.PORT);
+        console.log("[INFO] Bot listening on *:" + c.PORT);
     });
-}
\ No newline at end of file
+}