2020-09-02 11:31:06 +01:00
|
|
|
const osu = require("osu-packet"),
|
2022-01-04 03:39:53 +00:00
|
|
|
getUserById = require("../util/getUserById.js");
|
2020-09-02 11:31:06 +01:00
|
|
|
|
|
|
|
module.exports = function(CurrentUser, InvitedUser) {
|
2022-01-04 03:39:53 +00:00
|
|
|
let osuPacketWriter = new osu.Bancho.Writer;
|
2020-09-02 11:31:06 +01:00
|
|
|
|
2022-01-04 03:39:53 +00:00
|
|
|
const InvitedUserClass = getUserById(InvitedUser);
|
2020-09-02 11:31:06 +01:00
|
|
|
|
2022-01-04 03:39:53 +00:00
|
|
|
osuPacketWriter.SendMessage({
|
|
|
|
sendingClient: CurrentUser.username,
|
|
|
|
message: `Come join my multiplayer match: [osump://${CurrentUser.currentMatch.matchId}/ ${CurrentUser.currentMatch.gameName}]`,
|
|
|
|
target: CurrentUser.username,
|
|
|
|
senderId: CurrentUser.id
|
|
|
|
});
|
2020-09-02 11:31:06 +01:00
|
|
|
|
2022-01-04 03:39:53 +00:00
|
|
|
InvitedUserClass.addActionToQueue(osuPacketWriter.toBuffer);
|
2020-09-02 11:31:06 +01:00
|
|
|
}
|