From 486f03583c25093f198e4e5076f8b07e369aea3f Mon Sep 17 00:00:00 2001 From: henne Date: Thu, 28 Apr 2016 23:32:29 +0200 Subject: [PATCH] added mention --- src/ctdo.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ctdo.js b/src/ctdo.js index aea018f..3e8a589 100644 --- a/src/ctdo.js +++ b/src/ctdo.js @@ -1,5 +1,6 @@ const net = require('net'); +const myName = process.env['HUBOT_IRC_NICK']; module.exports = function(robot) { // old stuff // lampel @@ -16,25 +17,25 @@ module.exports = function(robot) { client.end(command); }); } - robot.hear(/^rot$/i, function(r) { + robot.hear(/^raumgirl: rot$/i, function(r) { setLampel(1,0,0); }); - robot.hear(/^gruen$/i, function(r) { + robot.hear(/^raumgirl: gruen$/i, function(r) { setLampel(0,0,1); }); - robot.hear(/^gelb$/i, function(r) { + robot.hear(/^raumgirl: gelb$/i, function(r) { setLampel(0,1,0); }); - robot.hear(/^(all|alle)$/i, function(r) { + robot.hear(/^raumgirl: (all|alle|rotgelbgruen|gelbrotgruen|rotgruengelb|gelbgruenrot|gruenrotgelb|gruengelbrot)$/i, function(r) { setLampel(1,1,1); }); - robot.hear(/^(rotgelb|gelbrot)$/i, function(r) { + robot.hear(/^raumgirl: (rotgelb|gelbrot)$/i, function(r) { setLampel(1,1,0); }); - robot.hear(/^(gruengelb|gelbgruen)$/i, function(r) { + robot.hear(/^raumgirl: (gruengelb|gelbgruen)$/i, function(r) { setLampel(0,1,1); }); - robot.hear(/^(rotgruen|gruenrot)$/i, function(r) { + robot.hear(/^raumgirl: (rotgruen|gruenrot)$/i, function(r) { setLampel(1,0,1); }); // topic @@ -100,7 +101,7 @@ module.exports = function(robot) { } }); // new stuff - robot.respond(/status$/i, function(r) { + robot.respond(/^raumgirl: status$/i, function(r) { robot.http("http://status.ctdo.de/api/simple/v2") .header('Accept', 'application/json') .get()(function(err, res, body) {