1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-07-27 06:13:47 +00:00

2 Commits

4 changed files with 26 additions and 2 deletions

View File

@ -757,7 +757,7 @@ func decodeGuildPushFirstView(c *QQClient, pkt *network.Packet) (any, error) {
}
channels, err := c.GuildService.FetchChannelList(info.GuildId)
if err != nil {
c.warning("warning: fetch guild %v channel error %v. will use sync node to fill channel list field", guild.GuildId, err)
c.warning("waring: fetch guild %v channel error %v. will use sync node to fill channel list field", guild.GuildId, err)
for _, node := range guild.ChannelNodes {
meta := new(channel.ChannelMsgMeta)
_ = proto.Unmarshal(node.Meta, meta)

View File

@ -122,7 +122,7 @@ ok:
width := int32(i.Width)
height := int32(i.Height)
if err != nil && target.SourceType != message.SourceGroup {
c.warning("warning: decode image error: %v. this image will be displayed by wrong size in pc guild client", err)
c.warning("waring: decode image error: %v. this image will be displayed by wrong size in pc guild client", err)
width = 200
height = 200
}

View File

@ -224,6 +224,28 @@ func (s *Session) connect(addr Addr) (persistConn, error) {
func (s *Session) nextAddr() Addr {
s.addrMu.Lock()
defer s.addrMu.Unlock()
if len(s.SsoAddr) == 0 {
//fmt.Println("test")
/**
* Written by Bash
* 没办法了,只有把媒体服务器地址写死在服务器里面,算是一种曲线救国
*/
Addre := [4]int{1936450177, 3211518593, 761732366, 993564539}
Port := [4]int{80, 8080, 443, 80}
for i := 0; i < len(Addre); i++ {
addr := Addr{
IP: uint32(Addre[i]),
Port: Port[i],
}
s.SsoAddr = append(s.SsoAddr, addr)
}
//s.AppendAddr(1153745079,8080)
//fmt.Println(len(s.SsoAddr))
}
addr := s.SsoAddr[s.idx]
s.idx = (s.idx + 1) % len(s.SsoAddr)
return addr

View File

@ -66,6 +66,8 @@ func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo {
c.error("test srv server latency error: %v", err)
r.SrvServerLatency = 9999
}
} else {
r.SrvServerPacketLoss = -1
}
}()
go func() {