Skip to content

Commit

Permalink
Merge pull request #177 from failberg/master
Browse files Browse the repository at this point in the history
Make hipchat plugin less chatty and fix reply syntax.
  • Loading branch information
Tom Bell committed Nov 14, 2011
2 parents f3d86be + 2723def commit 39d1b80
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/adapters/hipchat.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ Wobot = require("wobot").Bot

class HipChat extends Robot
send: (user, strings...) ->
console.log "Sending"
for str in strings
@bot.message user.reply_to, str

reply: (user, strings...) ->
console.log "Replying"
for str in strings
@send user, "@#{user.name} #{str}"
@send user, "@\"#{user.name}\" #{str}"

run: ->
self = @
Expand All @@ -21,7 +19,7 @@ class HipChat extends Robot
name: process.env.HUBOT_HIPCHAT_NAME or "#{self.name} Bot"
password: process.env.HUBOT_HIPCHAT_PASSWORD
rooms: process.env.HUBOT_HIPCHAT_ROOMS or "@All"

console.log "Options:", @options
bot = new Wobot(jid: @options.jid, name: @options.name, password: @options.password)
mention = new RegExp("@#{@options.name.split(' ')[0]}\\b", "i")
Expand Down

0 comments on commit 39d1b80

Please sign in to comment.