Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

DWIM adapter instead of hardwiring irc

  • Loading branch information...
commit 33bb8d1a77269ea14ed171e553b0d0b6546f9084 1 parent e657436
Tatsuhiko Miyagawa authored October 26, 2011

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  bin/hubot-wrapper
8  bin/hubot-wrapper
@@ -9,11 +9,17 @@ process.env.REDISTOGO_URL = environment.DOTCLOUD_REDIS_REDIS_URL
9 9
 for k, v of environment
10 10
   process.env[k] = v
11 11
 
  12
+adapter = ''
  13
+if environment.HUBOT_IRC_NICK
  14
+  adapter = 'irc'
  15
+else if environment.HUBOT_CAMPFIRE_ROOMS
  16
+  adapter = 'campfire'
  17
+
12 18
 name = environment.HUBOT_IRC_NICK || 'Hubot'
13 19
 exec = require('child_process').execFile
14 20
 exec(
15 21
   '/home/dotcloud/current/node_modules/.bin/coffee',
16  
-  [ 'bin/hubot', '-a', 'irc', '-n', name ],
  22
+  [ 'bin/hubot', '-a', adapter, '-n', name ],
17 23
   { env: process.env },
18 24
   (err, stdout, stderr) ->
19 25
      console.log stdout

0 notes on commit 33bb8d1

Please sign in to comment.
Something went wrong with that request. Please try again.