From 0f6cca8fbc1f0715eca52adc7056e1537d5d490f Mon Sep 17 00:00:00 2001 From: henne Date: Sat, 30 Apr 2016 11:43:35 +0200 Subject: [PATCH] fixes and bugsearch --- package.json | 2 +- src/ctdo.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 070f212..da6201f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hubot-raumgirl-new", "description": "ctdo raumgirl", - "version": "0.0.1", + "version": "0.0.2", "author": "henne@ctdo.de", "license": "MIT", diff --git a/src/ctdo.js b/src/ctdo.js index 3e8a589..5790a9b 100644 --- a/src/ctdo.js +++ b/src/ctdo.js @@ -38,6 +38,9 @@ module.exports = function(robot) { robot.hear(/^raumgirl: (rotgruen|gruenrot)$/i, function(r) { setLampel(1,0,1); }); + robot.hear(/^raumgirl: (aus|off)$/i, function(r) { + setLampel(0,0,0); + } // topic robot.adapter.bot.addListener('topic', function(channel, topic) { if(typeof(robot.brain.data.topics) !== 'Object') { @@ -102,10 +105,12 @@ module.exports = function(robot) { }); // new stuff robot.respond(/^raumgirl: status$/i, function(r) { + console.log("status"); robot.http("http://status.ctdo.de/api/simple/v2") .header('Accept', 'application/json') .get()(function(err, res, body) { var data = JSON.parse(body); + console.log(body); r.reply("Derzeit im Treff: " + data.names.join(', ')); }) });