added mention

This commit is contained in:
henne 2016-04-28 23:32:29 +02:00
parent ec290e067d
commit 486f03583c
1 changed files with 9 additions and 8 deletions

View File

@ -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) {