Skip to content

Commit

Permalink
Merge pull request nandub#111 from ChristianGaertner/patch-1
Browse files Browse the repository at this point in the history
Added NOTICE listener
  • Loading branch information
jgable committed Feb 22, 2014
2 parents 360619b + 51490cc commit 673b8f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@ class IrcBot extends Adapter
for nick of nicks
self.createUser channel, nick

bot.addListener 'notice', (from, to, message) ->
if from in options.ignoreUsers
console.log('Ignoring user: %s', from)
# we'll ignore this message if it's from someone we want to ignore
return

console.log "NOTICE from #{from} to #{to}: #{message}"

user = self.createUser to, from
self.receive new TextMessage(user, message)

bot.addListener 'message', (from, to, message) ->
if options.nick.toLowerCase() == to.toLowerCase()
# this is a private message, let the 'pm' listener handle it
Expand Down

0 comments on commit 673b8f0

Please sign in to comment.