一起动作

master
yin5th 2021-11-25 10:39:53 +08:00
parent 66a46bd31c
commit 61e30220d0
1 changed files with 7 additions and 4 deletions

View File

@ -134,13 +134,13 @@ function receiveMessage(event)
// 大航海列表
if (adminList.length > 0) {
// 获取当前领舞人
let leader = getLeader()
let currentLeader = getLeader()
let now = (new Date).getTime()/1000
if (leader['name'] === '') {
if (currentLeader['name'] === '') {
setLeader(adminList[0], leaderTime)
} else {
//领舞人存在 检查过期时间
if (leader['time'] === 0 || leader['time'] < now) {
if (currentLeader['time'] === 0 || currentLeader['time'] < now) {
// 切换领舞
// 当前领舞人
@ -184,12 +184,15 @@ function receiveMessage(event)
let leader = {
uid: 0, uname: leaderInfo, text: '', event: ''
}
if (isLeader) {
let leaderEvent = getLeaderEvent(dm.text)
leader.uid = dm.uid
leader.uname = dm.uname
leader.text = dm.text
leader.event = getLeaderEvent(dm.text)
leader.event = eventName ? eventName : leaderEvent
}
// 新用户
if(dm.is_new==1){
// if(dm.uname!=leader.uname){//如果弹幕的人的名字不等于领舞者的名字,就创建一个人物