Permalink
Browse files

better system messages

  • Loading branch information...
1 parent 50eb561 commit 4bc8650bdb2cd77f31fda9cad846d7a6e68cf4a9 @ricardobeat ricardobeat committed Oct 24, 2011
Showing with 8 additions and 6 deletions.
  1. +6 −3 commands/admin.coffee
  2. +1 −1 server.coffee
  3. +1 −2 system.coffee
View
@@ -1,6 +1,9 @@
brain.addPattern 'reloadServer',
match: [/^\s?(reload|restart)\s*$/i]
fn: (user, m, cb) ->
- switch m[1]
- when 'reload' then florinda.reload()
- when 'restart' then florinda.restart()
+ if m[1] is 'reload'
+ florinda.say "Reloading..."
+ florinda.reload()
+ else if m[1] is 'restart'
+ florinda.say "Restarting..."
+ florinda.restart()
View
@@ -100,7 +100,7 @@ server = http.createServer (req, res) ->
if payload and params?.reload == '1' and params.key == config.key
console.log "** RELOADING (push) **"
res.end "** RELOADING (push) **"
- florinda.say "#{payload.commits[0]?.author.name} pushed to github, restarting...", ->
+ florinda.say "#{payload.commits[0]?.author.name} pushed to github, reloading...", ->
florinda.reload()
return
View
@@ -20,8 +20,7 @@ module.exports =
else
console.log "erro #{[err]}"
- reload: (msg) ->
- if not msg then florinda.say 'Updating && restarting...'
+ reload: () ->
exec 'git pull', (err, stdout, stderr) ->
if err
console.log "git pull failed" if program.verbose

0 comments on commit 4bc8650

Please sign in to comment.