Skip to content

Commit

Permalink
Don't enable done flag with text.
Browse files Browse the repository at this point in the history
Set text after creating leave message.
  • Loading branch information
take-cheeze committed May 23, 2014
1 parent 2b6177c commit c4624a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,18 @@ class IrcBot extends Adapter
logger.info('%s has left %s: %s', who, channel, reason)
user = self.createUser '', who
user.room = channel
self.receive new LeaveMessage(user, reason)
msg = new LeaveMessage user
msg.text = reason
self.receive msg

bot.addListener 'quit', (who, reason, channels) ->
logger.info '%s has quit: %s (%s)', who, channels, reason
for ch in channels
user = self.createUser '', who
user.room = ch
self.receive new LeaveMessage(user, reason)
msg = new LeaveMessage user
msg.text = reason
self.receive msg

bot.addListener 'kick', (channel, who, _by, reason) ->
logger.info('%s was kicked from %s by %s: %s', who, channel, _by, reason)
Expand Down

0 comments on commit c4624a0

Please sign in to comment.