Skip to content

Commit

Permalink
Trigger TextMessage when actions are done
Browse files Browse the repository at this point in the history
  • Loading branch information
halkeye committed Jul 25, 2013
1 parent b50d74f commit b42caf3
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 @@ -194,6 +194,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 b42caf3

Please sign in to comment.