Abracted away broadcast utils

This commit is contained in:
stratic-dev
2024-10-13 18:23:04 +01:00
parent 5f975c97b5
commit 0af565a766
38 changed files with 479 additions and 434 deletions

View File

@@ -3,6 +3,7 @@ package channelserver
import (
"erupe-ce/config"
"erupe-ce/network/mhfpacket"
"erupe-ce/utils/broadcast"
"erupe-ce/utils/byteframe"
"erupe-ce/utils/stringsupport"
"erupe-ce/utils/token"
@@ -19,7 +20,7 @@ func handleMsgMhfGetBbsUserStatus(s *Session, p mhfpacket.MHFPacket) {
bf.WriteUint32(0)
bf.WriteUint32(0)
bf.WriteUint32(0)
DoAckBufSucceed(s, pkt.AckHandle, bf.Data())
broadcast.DoAckBufSucceed(s, pkt.AckHandle, bf.Data())
}
// Checks the status of Bultin Board Server to see if authenticated
@@ -30,7 +31,7 @@ func handleMsgMhfGetBbsSnsStatus(s *Session, p mhfpacket.MHFPacket) {
bf.WriteUint32(401) //unk http status?
bf.WriteUint32(401) //unk http status?
bf.WriteUint32(0)
DoAckBufSucceed(s, pkt.AckHandle, bf.Data())
broadcast.DoAckBufSucceed(s, pkt.AckHandle, bf.Data())
}
// Tells the game client what host port and gives the bultin board article a token
@@ -49,6 +50,6 @@ func handleMsgMhfApplyBbsArticle(s *Session, p mhfpacket.MHFPacket) {
if config.GetConfig().Screenshots.Enabled && config.GetConfig().Discord.Enabled {
s.Server.DiscordScreenShotSend(pkt.Name, pkt.Title, pkt.Description, articleToken)
}
DoAckBufSucceed(s, pkt.AckHandle, bf.Data())
broadcast.DoAckBufSucceed(s, pkt.AckHandle, bf.Data())
}