From afdacbf4ddf46c4fcc2688a41498bb735243b161 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Thu, 24 Sep 2015 04:56:32 +0200 Subject: [PATCH] Avoid cases for consistency --- scripts/shell.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/shell.coffee b/scripts/shell.coffee index ff23796..4248017 100644 --- a/scripts/shell.coffee +++ b/scripts/shell.coffee @@ -18,17 +18,17 @@ isFromAdmin = (res) -> res.message.user.room is process.env.ADMIN_ROOM?.replace(':','#') or res.robot.adapterName is 'shell' runCmd = (cmd,res,cb) -> - if res?.send? then res.send 'Operazione in corso: '+cmd + if res?.send? then res.send 'operazione in corso: '+cmd if process.env.TESTING_ASJON # Fingi di eseguire l'operazione - if res?.send? then res.send 'Operazione "completata": '+cmd + if res?.send? then res.send 'operazione "completata": '+cmd if cb?.call? then cb null,'','' else cp.exec cmd, (err,stdout,stderr) -> if res?.send? if err - res.send 'Operazione fallita:\n'+stdout+stderr + res.send 'operazione fallita:\n'+stdout+stderr else - res.send 'Operazione completata:\n'+stdout + res.send 'operazione completata:\n'+stdout if cb?.call? then cb err,stdout,stderr module.exports = (robot) ->