|
|
@ -10,6 +10,7 @@ import (
|
|
|
|
"live-gateway/live"
|
|
|
|
"live-gateway/live"
|
|
|
|
"live-gateway/ws"
|
|
|
|
"live-gateway/ws"
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -145,6 +146,10 @@ func (l *LiveBilibili) HandlerMessage(v interface{}) {
|
|
|
|
logger.SLog.Error("读取消息CMD错误")
|
|
|
|
logger.SLog.Error("读取消息CMD错误")
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 暂时忽略CMD错误
|
|
|
|
|
|
|
|
if strings.Contains(cmd.CMD, "DANMU_MSG") {
|
|
|
|
|
|
|
|
cmd.CMD = "DANMU_MSG"
|
|
|
|
|
|
|
|
}
|
|
|
|
handler, ok := l.msgHandlerMapper[cmd.CMD]
|
|
|
|
handler, ok := l.msgHandlerMapper[cmd.CMD]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
logger.SLog.Debugf("未发现 %s 处理器", cmd.CMD)
|
|
|
|
logger.SLog.Debugf("未发现 %s 处理器", cmd.CMD)
|
|
|
|