Skip to content

Commit

Permalink
Merge pull request nandub#91 from halkeye/add-action-support
Browse files Browse the repository at this point in the history
Add emote support
  • Loading branch information
jgable committed Jul 25, 2013
2 parents f255884 + f98db8e commit 9d4e431
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ class IrcBot extends Adapter
for str in strings
@bot.say target, str

emote: (envelope, strings...) ->
# Use @notice if SEND_NOTICE_MODE is set
return @notice envelope, strings if process.env.HUBOT_IRC_SEND_NOTICE_MODE?

target = @_getTargetFromEnvelope envelope

unless target
return console.log "ERROR: Not sure who to send to. envelope=", envelope

for str in strings
@bot.action target, str

notice: (envelope, strings...) ->
target = @_getTargetFromEnvelope envelope

Expand Down

0 comments on commit 9d4e431

Please sign in to comment.