From 1081db07286b904bc3fbf662583572ec33ba8145 Mon Sep 17 00:00:00 2001 From: Akiba Date: Sat, 14 May 2022 12:07:27 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20User=20&=20Medal=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9B=B4=E5=A4=9A=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- message/danmu.go | 16 ++++++++++------ message/user.go | 12 ++++++++---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/message/danmu.go b/message/danmu.go index e65fd94..20920a5 100644 --- a/message/danmu.go +++ b/message/danmu.go @@ -74,15 +74,19 @@ func (d *Danmaku) Parse(data []byte) { } d.Content = info.Get("1").String() d.Sender = &User{ - Uid: int(info.Get("2.0").Int()), - Uname: info.Get("2.1").String(), - GuardLevel: int(info.Get("7").Int()), + Uid: int(info.Get("2.0").Int()), + Uname: info.Get("2.1").String(), + Admin: info.Get("2.2").Bool(), + Urank: int(info.Get("2.5").Int()), + MobileVerify: info.Get("2.6").Bool(), + GuardLevel: int(info.Get("7").Int()), Medal: &Medal{ - Name: info.Get("3.1").String(), Level: int(info.Get("3.0").Int()), - UpUid: int(info.Get("3.12").Int()), - UpRoomId: int(info.Get("3.3").Int()), + Name: info.Get("3.1").String(), UpName: info.Get("3.2").String(), + UpRoomId: int(info.Get("3.3").Int()), + Color: int(info.Get("3.4").Int()), + UpUid: int(info.Get("3.12").Int()), }, } d.Extra = ext diff --git a/message/user.go b/message/user.go index 2ddee6b..725a211 100644 --- a/message/user.go +++ b/message/user.go @@ -1,15 +1,19 @@ package message type User struct { - Uid int - Uname string - Medal *Medal - GuardLevel int + Uid int + Uname string + Admin bool + Urank int + MobileVerify bool + Medal *Medal + GuardLevel int } type Medal struct { Name string Level int + Color int UpRoomId int UpUid int UpName string