// Msg类型数据处理方法map
var Msg_map = map[string]func(replyF, string){
- `DM_INTERACTION`: nil, //他们都在说
+ `ROOM_LOCK`: replyF.room_lock, //房间封禁提示
+ `DM_INTERACTION`: nil, //他们都在说
`BENEFIT_CARD_CLEAN`: nil,
`WEALTH_NOTIFY`: replyF.wealth_notify, //荣耀等级提示
`LOG_IN_NOTICE`: replyF.log_in_notice, //登录提示
msglog.Base_add("Unknow").L(`W: `, s)
}
+// 房间封禁提示
+func (replyF) room_lock(s string) {
+ msglog := msglog.Base_add("房")
+ var j ws_msg.ROOM_LOCK
+ if e := json.Unmarshal([]byte(s), &j); e != nil {
+ msglog.L(`E: `, e)
+ return
+ }
+ Gui_show(fmt.Sprintf("房间被封禁,解锁时间:%s", j.Expire), `0room`)
+ msglog.L(`W: `, fmt.Sprintf("房间被封禁,解锁时间:%s", j.Expire))
+}
+
// 荣耀等级提示
func (replyF) wealth_notify(s string) {
msglog := msglog.Base_add("房")
--- /dev/null
+package part
+
+type ROOM_LOCK struct {
+ Cmd string `json:"cmd"`
+ Expire string `json:"expire"`
+ Roomid int `json:"roomid"`
+}
return
}
+ if c.C.Locked {
+ log.L(`W: `, "房间被封禁")
+ return
+ }
+
{ //发送请求(银瓜子礼物)
csrf, _ := c.C.Cookie.LoadV(`bili_jct`).(string)
if csrf == `` {