1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

Logging update

This commit is contained in:
Sam 2021-04-11 05:11:44 +08:00
parent 5ec6c651b7
commit badbc16fa5
No known key found for this signature in database
GPG Key ID: 2057906F881702DD
2 changed files with 9 additions and 2 deletions

View File

@ -104,7 +104,7 @@ func (c *QQClient) commMsgProcessor(pMsg *msg.Message, info *incomingPacketInfo)
if decoder, ok := c2cDecoders[pMsg.Head.GetMsgType()]; ok { if decoder, ok := c2cDecoders[pMsg.Head.GetMsgType()]; ok {
decoder(c, pMsg, info) decoder(c, pMsg, info)
} else { } else {
c.Debug("unknown msg type on c2c processor: %v", pMsg.Head.GetMsgType()) c.Debug("unknown msg type on c2c processor: %v - %v", pMsg.Head.GetMsgType(), pMsg.Head.GetC2CCmd())
} }
} }

View File

@ -352,7 +352,14 @@ func decodeMsgSendResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (
return nil, errors.Wrap(err, "failed to unmarshal protobuf message") return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
} }
if rsp.GetResult() != 0 { if rsp.GetResult() != 0 {
c.Error("send msg error: %v %v", rsp.GetResult(), rsp.GetErrMsg()) switch rsp.GetResult() {
case 55:
c.Error("send msg error: %v Bot has blocked target's content", rsp.GetResult())
break
default:
c.Error("send msg error: %v %v", rsp.GetResult(), rsp.GetErrMsg())
break
}
} }
return nil, nil return nil, nil
} }