Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

DWIM adapter instead of hardwiring irc

  • Loading branch information...
commit 33bb8d1a77269ea14ed171e553b0d0b6546f9084 1 parent e657436
@miyagawa authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 bin/hubot-wrapper
View
8 bin/hubot-wrapper
@@ -9,11 +9,17 @@ process.env.REDISTOGO_URL = environment.DOTCLOUD_REDIS_REDIS_URL
for k, v of environment
process.env[k] = v
+adapter = ''
+if environment.HUBOT_IRC_NICK
+ adapter = 'irc'
+else if environment.HUBOT_CAMPFIRE_ROOMS
+ adapter = 'campfire'
+
name = environment.HUBOT_IRC_NICK || 'Hubot'
exec = require('child_process').execFile
exec(
'/home/dotcloud/current/node_modules/.bin/coffee',
- [ 'bin/hubot', '-a', 'irc', '-n', name ],
+ [ 'bin/hubot', '-a', adapter, '-n', name ],
{ env: process.env },
(err, stdout, stderr) ->
console.log stdout
Please sign in to comment.
Something went wrong with that request. Please try again.