Skip to content

Commit 9d4e431

Browse files
committed
Merge pull request nandub#91 from halkeye/add-action-support
Add emote support
2 parents f255884 + f98db8e commit 9d4e431

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: src/irc.coffee

+12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ class IrcBot extends Adapter
1717
for str in strings
1818
@bot.say target, str
1919

20+
emote: (envelope, strings...) ->
21+
# Use @notice if SEND_NOTICE_MODE is set
22+
return @notice envelope, strings if process.env.HUBOT_IRC_SEND_NOTICE_MODE?
23+
24+
target = @_getTargetFromEnvelope envelope
25+
26+
unless target
27+
return console.log "ERROR: Not sure who to send to. envelope=", envelope
28+
29+
for str in strings
30+
@bot.action target, str
31+
2032
notice: (envelope, strings...) ->
2133
target = @_getTargetFromEnvelope envelope
2234

0 commit comments

Comments
 (0)