mirror of
https://github.com/statbate/special-pancake.git
synced 2026-08-11 03:12:42 +00:00
Update worker.go
This commit is contained in:
parent
44177a0927
commit
a5646a39f6
1 changed files with 2 additions and 2 deletions
|
|
@ -247,12 +247,12 @@ func xWorker(workerData Info, u url.URL) {
|
|||
//fmt.Println(inmsg.User.Username, inmsg.User.Gender, inmsg.User.IsBroadcaster, inmsg.Action, workerData.room)
|
||||
|
||||
if inmsg.User.Username == workerData.room && inmsg.User.IsBroadcaster {
|
||||
if inmsg.Action == "leave" {
|
||||
if inmsg.Action == "leave" && !isLeave {
|
||||
fmt.Println("leave, start ticker", workerData.room)
|
||||
leave.Reset(60 * 10 * time.Second)
|
||||
isLeave = true
|
||||
}
|
||||
if inmsg.Action == "enter" {
|
||||
if inmsg.Action == "enter" && isLeave {
|
||||
fmt.Println("enter, stop ticker", workerData.room)
|
||||
leave.Reset(60 * 60 * 8 * time.Second)
|
||||
isLeave = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue