Fix error when chat is unknown (damn precedence)

This commit is contained in:
rnhmjoj 2015-06-30 04:31:51 +02:00
parent b759a0be62
commit 082112cc21

View File

@ -132,7 +132,7 @@ module.exports = (robot) ->
robot.respond /(mi )?invit(i|ami) (in|nel gruppo) ([^?]+)\??/, (res) ->
denied = ['BZBZ ADMIN-NOT-DETECTED', 'BZBZ IS-NOT-AUTHORIZED', 'BZBZ ACCESS-DENIED']
nope = ['ahahah NO', 'mai sentito questo?', 'invita anche me magari']
nope = ['ahahah NO', 'mai sentito questo', 'invita anche me magari', 'che?']
ok = ['provvedo subito', 'ok', 'certo', 'va bene']
done = ['fatto', 'ecco qui', 'ecco fatto']
@ -141,7 +141,7 @@ module.exports = (robot) ->
admin_id = process.env['ADMIN_ROOM'].replace ':', '#'
chat_list (list) ->
if not name in list
if not (name in list)
return res.send res.random nope
chat_info name, (chat) ->
if chat.id is admin_id