remove the #userlog channel

This commit is contained in:
Holly Stubbs 2022-06-28 00:27:18 +01:00
parent b42a70d00a
commit 2e2fb4c609
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E
2 changed files with 1 additions and 14 deletions

View file

@ -17,14 +17,5 @@ module.exports = function(CurrentUser) {
// Remove user from user list // Remove user from user list
global.users.remove(CurrentUser.uuid); global.users.remove(CurrentUser.uuid);
const osuPacketWriter = new osu.Bancho.Writer();
osuPacketWriter.SendMessage({
sendingClient: global.botUser.username,
message: `User ${CurrentUser.username} has logged out.`,
target: "#userlog",
senderId: global.botUser.id
});
global.StreamsHandler.sendToStream("#userlog", osuPacketWriter.toBuffer);
consoleHelper.printBancho(`User logged out, took ${Date.now() - logoutStartTime}ms. [User: ${CurrentUser.username}]`); consoleHelper.printBancho(`User logged out, took ${Date.now() - logoutStartTime}ms. [User: ${CurrentUser.username}]`);
} }

View file

@ -112,15 +112,11 @@ module.exports = async function(req, res, loginInfo) {
// peppy pls, why // peppy pls, why
osuPacketWriter.ChannelListingComplete(); osuPacketWriter.ChannelListingComplete();
// Add user to chat channels // Add user to #osu
osuPacketWriter.ChannelJoinSuccess("#osu"); osuPacketWriter.ChannelJoinSuccess("#osu");
if (!global.StreamsHandler.isUserInStream("#osu", NewUser.uuid)) if (!global.StreamsHandler.isUserInStream("#osu", NewUser.uuid))
global.StreamsHandler.addUserToStream("#osu", NewUser.uuid); global.StreamsHandler.addUserToStream("#osu", NewUser.uuid);
osuPacketWriter.ChannelJoinSuccess("#userlog");
if (!global.StreamsHandler.isUserInStream("#userlog", NewUser.uuid))
global.StreamsHandler.addUserToStream("#userlog", NewUser.uuid);
// List all channels out to the client // List all channels out to the client
for (let i = 0; i < global.channels.length; i++) { for (let i = 0; i < global.channels.length; i++) {
osuPacketWriter.ChannelAvailable({ osuPacketWriter.ChannelAvailable({