freifunk-bot

Modular parser for the hackerspace door status with handlers for multiple services
git clone git://archive.git.mtrnord.blog/MTRNord/freifunk-bot.git
Log | Files | Refs | README | LICENSE

commit c1e94e8b56bcf2314060e9209b8751032eed8e70
parent 833e80ce8e4ffa405b128529de974c1fc7f15300
Author: Marcel Radzio <marcel@radzio-sh.de>
Date:   Sat, 12 Dec 2015 00:16:46 +0100

nothing changed

Diffstat:
Mhandlers/irc.js | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/handlers/irc.js b/handlers/irc.js @@ -7,7 +7,6 @@ var bot = new irc.Client('irc.lugfl.de', 'DoorBot', { messageSplit: 1000000 }); var request = require('request'); -var fs = require('fs'); module.exports = { ircPreload: function (){ bot.addListener('error', function(message) { @@ -58,6 +57,14 @@ module.exports = { // console.log(from + ' => ' + to + ': ' + message); bot.say(from, "The Hackerpace of Norlab e.V. is usually opened every Monday at 6pm o'clock."); } + if (message == "!klassiker"){ + // console.log(from + ' => ' + to + ': ' + message); + bot.say(to, "Für mehr oder weniger hilfreiche Kommentare den klassiker fragen."); + } + if (message == "make me a sandwich"){ + // console.log(from + ' => ' + to + ': ' + message); + bot.say(to, "REALLY??? DO IT ON YOUR OWN!! I am NOT your Maid!!"); + } if (message == "!doorstatus"){ request.get('http://www.nordlab-ev.de/doorstate/status.txt', function (error, response, body) { if (!error && response.statusCode == 200) {