From c4624a0094f7fd229b88bdd2a88366b1b1448416 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Sat, 24 May 2014 03:43:39 +0900 Subject: [PATCH] Don't enable done flag with text. Set text after creating leave message. --- src/irc.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/irc.coffee b/src/irc.coffee index 3877bc5..2d4cffd 100644 --- a/src/irc.coffee +++ b/src/irc.coffee @@ -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)