Skip to content

Commit

Permalink
Merge pull request nandub#92 from halkeye/action-event
Browse files Browse the repository at this point in the history
Trigger TextMessage when actions are done
  • Loading branch information
jgable committed Aug 21, 2013
2 parents 9d4e431 + b42caf3 commit 5a4a72c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ class IrcBot extends Adapter

self.receive new TextMessage(user, message)

bot.addListener 'action', (from, to, message) ->
console.log " * From #{from} to #{to}: #{message}"
user = self.createUser to, from
if user.room
console.log "#{to} * #{from} #{message}"
else
console.log "msg <#{from}> #{message}"

self.receive new TextMessage(user, message)

bot.addListener 'error', (message) ->
console.error('ERROR: %s: %s', message.command, message.args.join(' '))

Expand Down

0 comments on commit 5a4a72c

Please sign in to comment.