|
@@ -259,8 +259,7 @@ if(cluster.isMaster){
|
|
sockets[i].get('nick',function(e,nick){
|
|
sockets[i].get('nick',function(e,nick){
|
|
if(e){
|
|
if(e){
|
|
logger.error(e);
|
|
logger.error(e);
|
|
- ret.push('');
|
|
|
|
- }else{
|
|
|
|
|
|
+ }else if(!inArray(ret,nick)){
|
|
logger.debug(room+' '+nick);
|
|
logger.debug(room+' '+nick);
|
|
ret.push(nick);
|
|
ret.push(nick);
|
|
}
|
|
}
|
|
@@ -273,6 +272,14 @@ if(cluster.isMaster){
|
|
};
|
|
};
|
|
getNext();
|
|
getNext();
|
|
},
|
|
},
|
|
|
|
+ inArray = function(arr,val){
|
|
|
|
+ for(var i in arr){
|
|
|
|
+ if(arr[i] == val){
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ },
|
|
sendUserList = function(room){
|
|
sendUserList = function(room){
|
|
if(typeof room != 'undefined'){
|
|
if(typeof room != 'undefined'){
|
|
runWithUserList(room,function(users){
|
|
runWithUserList(room,function(users){
|