Skip to content

Commit

Permalink
Added leave message
Browse files Browse the repository at this point in the history
  • Loading branch information
riovv committed Jan 11, 2012
1 parent a8f34be commit 45c5a0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/talker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ talker.handleResponse = function(data) {
case 'join':
talker.log(response.user.name.grey, 'has entered the room'.grey);
break;
case 'leave':
talker.log(response.user.name.grey, 'has left the room'.grey);
break;
case 'users':
talker.log('Who\'s here:', response.users.map(function (user) { return user.name; }).join(', '));
break;
Expand Down Expand Up @@ -77,6 +80,8 @@ talker.connect = function (room, token) {
// Has to send this at a minimum interval of 30s.
talker.pingId = setInterval(talker.ping, 15000);
});

return talker;
};

talker.message = function (content) {
Expand Down

0 comments on commit 45c5a0d

Please sign in to comment.