Skip to content

Commit

Permalink
Add room information when a user joins/leaves
Browse files Browse the repository at this point in the history
  • Loading branch information
justafish committed Feb 17, 2014
1 parent 6cf6acd commit 9cd69bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,13 @@ class IrcBot extends Adapter
bot.addListener 'join', (channel, who) ->
console.log('%s has joined %s', who, channel)
user = self.createUser channel, who
user.room = channel
self.receive new EnterMessage(user)

bot.addListener 'part', (channel, who, reason) ->
console.log('%s has left %s: %s', who, channel, reason)
user = self.createUser '', who
user.room = channel
self.receive new LeaveMessage(user)

bot.addListener 'kick', (channel, who, _by, reason) ->
Expand Down

0 comments on commit 9cd69bc

Please sign in to comment.