daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Aug 12th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var connected = new Array();
  2. var newUserGroup = now.getGroup("newUser");
  3.  
  4. everyone.connected(function() {
  5.     console.log('Connected: ' + this.now.name);
  6.     // add old users to new guy
  7.     newUserGroup.addUser(this.user.clientId);
  8.     for(var i = 0; i < connected.length ; i++) {
  9.         newUserGroup.now.addNewAvatar(connected[i]);
  10.     }
  11.     newUserGroup.removeUser(this.user.clientId);
  12.     everyone.now.addNewAvatar(this.now.name);
  13.     connected.push(this.now.name);
  14. });
RAW Paste Data
Top