diff --git a/handler/steamplaying/service.go b/handler/steamplaying/service.go index 47ba2f3..5e50200 100644 --- a/handler/steamplaying/service.go +++ b/handler/steamplaying/service.go @@ -328,17 +328,6 @@ func checkDiffSteamGameStatus(steamID []string, lastTimeStat map[string]string) } } } - - // 检查是否有玩家退出游戏 - for steamID, lastGameID := range lastTimeStat { - if lastGameID != "" { - if currentGameID, exists := currentGameStatus[steamID]; !exists || currentGameID == "" { - // 玩家已退出游戏,不需要添加到通知列表,但需要更新状态 - currentGameStatus[steamID] = "" - } - } - } - return gameStatusListStr, Players, nil } diff --git a/handler/steamplaying/steam_playing.go b/handler/steamplaying/steam_playing.go index 3deb45e..5fa3265 100644 --- a/handler/steamplaying/steam_playing.go +++ b/handler/steamplaying/steam_playing.go @@ -25,8 +25,6 @@ func init() { handler.RegisterHelpInform("绑steam", "steam", "输入steamID,绑定您的steam账号。可以通过客户端右上角-账户明细 https://store.steampowered.com/account/ 查看,steamID位于页面左上角") handler.RegisterHandler("启用上号通知", bindSteamInGroup, constants.LEVEL_USER) handler.RegisterHelpInform("启用上号通知", "steam", "在群内启用您的steam上号通知") - // handler.RegisterHandler("群通报steam", bindSteamInGroupBroadCast, constants.LEVEL_USER) - // handler.RegisterHelpInform("群通报steam", "在群内启用你的steam游戏上线通报") handler.RegisterHandler("解绑steam", unbindSteam, constants.LEVEL_USER) handler.RegisterHelpInform("解绑steam", "steam", "解绑您的steam账号,并解绑所有群监听") handler.RegisterHandler("禁用上号通知", unbindSteamInGroup, constants.LEVEL_USER) @@ -239,18 +237,11 @@ func RoundCheckSteamPlaying() { } } - // 处理新上线的玩家 - for steamId := range gamePlayingMap { - if _, exists := playingMap[steamId]; !exists { - delete(exitInfoMap, steamId) // 新上线的玩家,清除可能存在的退出记录 - } - } - for _, group := range groups { time.Sleep(15 * time.Second) users, err := getSteamUsersInGroup(group) if err != nil { - fmt.Println("获取群成员steam列表失败: ", err) + log.Println("获取群成员steam列表失败: ", err) continue } var steamIds []string