Skip to content

Commit

Permalink
Handle quit message.
Browse files Browse the repository at this point in the history
  • Loading branch information
take-cheeze committed May 23, 2014
1 parent a31af4e commit 5677223
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,13 @@ class IrcBot extends Adapter
user.room = channel
self.receive new LeaveMessage(user)

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

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 5677223

Please sign in to comment.