Skip to content

Instantly share code, notes, and snippets.

@c-spencer
Created April 1, 2011 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c-spencer/898379 to your computer and use it in GitHub Desktop.
Save c-spencer/898379 to your computer and use it in GitHub Desktop.
everyone.now.joinChat = function () {
this.now.inChat = true;
var userlist = [];
everyone.now.iterate(function (user) {
if (user.now.inChat) {
userlist.push(userId(user));
}
});
this.now.receiveUsers(userlist);
everyone.now.broadcastJoin(this);
}
everyone.now.iterate = function (callback) {
callback(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment