Binato/server/Packets/UserPresenceBundle.js
2020-08-27 13:09:35 +01:00

16 lines
No EOL
414 B
JavaScript

const osu = require("osu-packet"),
userManager = require("../userManager.js");
module.exports = function(currentUser) {
const osuPacketWriter = new osu.Bancho.Writer;
let userIds = [];
for (let i = 0; i < global.users.length; i++) {
userIds.push(global.users[i].id);
}
osuPacketWriter.UserPresenceBundle(userIds);
currentUser.addActionToQueue(osuPacketWriter.toBuffer);
}