Fix bug in isFromAdmin

This commit is contained in:
Rnhmjoj 2015-04-27 17:29:58 +02:00
parent cea26142e0
commit 644237cf7d

View File

@ -15,7 +15,7 @@ cp = require 'child_process'
nope = ['BZBZ 400-BAD-REQUEST', 'BZBZ DOES-NOT-COMPUTE', 'BZBZ ADMIN-NOT-DETECTED', 'BZBZ IS-NOT-AUTHORIZED', 'BZBZ ACCESS-DENIED']
isFromAdmin = (res) ->
res.message.user.room? is process.env.ADMIN_ROOM?.replace(':','#') or res.robot.adapterName is 'shell'
res.message.user.room is process.env.ADMIN_ROOM?.replace(':','#') or res.robot.adapterName is 'shell'
module.exports = (robot) ->
robot.respond /(?:run|esegui|shell) (git|npm) (.+)/i, (res) ->