Skip to content

Commit 5a4a72c

Browse files
committed
Merge pull request nandub#92 from halkeye/action-event
Trigger TextMessage when actions are done
2 parents 9d4e431 + b42caf3 commit 5a4a72c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/irc.coffee

+10
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,16 @@ class IrcBot extends Adapter
206206

207207
self.receive new TextMessage(user, message)
208208

209+
bot.addListener 'action', (from, to, message) ->
210+
console.log " * From #{from} to #{to}: #{message}"
211+
user = self.createUser to, from
212+
if user.room
213+
console.log "#{to} * #{from} #{message}"
214+
else
215+
console.log "msg <#{from}> #{message}"
216+
217+
self.receive new TextMessage(user, message)
218+
209219
bot.addListener 'error', (message) ->
210220
console.error('ERROR: %s: %s', message.command, message.args.join(' '))
211221

0 commit comments

Comments
 (0)