From 6c51e3d2814b171b164fbb945d3efbfe9fc64b67 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Fri, 24 Apr 2015 10:28:01 +0200 Subject: [PATCH] nuova misc + fix --- bin/hubot | 2 +- scripts/misc.coffee | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/hubot b/bin/hubot index 6be02c8..58c09e9 100755 --- a/bin/hubot +++ b/bin/hubot @@ -2,7 +2,7 @@ set -e -#npm install +npm install export PATH="node_modules/.bin:node_modules/hubot/node_modules/.bin:$PATH" DEBUG=nightmare PYTHON=python2 BIND_ADDRESS=localhost node_modules/.bin/hubot --name "asjon" "$@" diff --git a/scripts/misc.coffee b/scripts/misc.coffee index da158a8..00ac626 100644 --- a/scripts/misc.coffee +++ b/scripts/misc.coffee @@ -20,6 +20,11 @@ module.exports = (robot) -> robot.http('http://canihazip.com/s') .get() (err, r, body) -> res.send 'dovrei essere a ' + body + robot.respond /con chi stai parlando/i, (res) -> + if res.message.user.name is res.message.room + res.send 'sto parlando con te, '+res.message.user.name + else + res.send 'sto parlando in '+rs.message.room+', '+res.message.user.name robot.respond /riavvia/i, (res) -> robot.send 'riavvio...' process.exit 0