Skip to content

Commit

Permalink
More correct implementation for join/leave messages for the bot.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotttf committed Jun 26, 2012
1 parent 9159d28 commit 0343013
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ class IrcBot extends Adapter
@bot.join channel, () ->
console.log('joined %s', channel)

user = self.userForName @bot.name
self.receive new EnterMessage(user)
self.receive new EnterMessage(null)

part: (channel) ->
self = @
@bot.part channel, () ->
console.log('left %s', channel)

user = self.userForName @bot.name
self.receive new LeaveMessage(user)
self.receive new LeaveMessage(null)

kick: (channel, client, message) ->
@bot.emit 'raw',
Expand Down

0 comments on commit 0343013

Please sign in to comment.