mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue where offline listeners not decreasing when leaving channel
This commit is contained in:
@@ -506,6 +506,13 @@ function left_channel(coll, guid, short_id, in_list, socket, change)
|
|||||||
Functions.remove_name_from_db(guid, name);
|
Functions.remove_name_from_db(guid, name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
db.collection("connected_users").update({"_id": "offline_users"}, {$pull: {users: guid}}, function(err, updated){
|
||||||
|
if(updated.nModified > 0) {
|
||||||
|
db.collection("connected_users").update({"_id": "total_users"}, {$pull: {total_users: guid + coll}}, function(err, updated){});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Functions.remove_unique_id(short_id);
|
Functions.remove_unique_id(short_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user