From 1c31c489c7e07d941c71867d859a77f86908d6b3 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Mon, 1 Dec 2025 18:27:19 +0530 Subject: [PATCH] fixes --- plugins/modules/matchmaking.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/matchmaking.go b/plugins/modules/matchmaking.go index d5df163..4ef5e60 100644 --- a/plugins/modules/matchmaking.go +++ b/plugins/modules/matchmaking.go @@ -16,7 +16,6 @@ type MatchmakingTicket struct { // -------------------------------------------------- // GENERIC MATCHMAKER — Supports ALL Games & Modes // -------------------------------------------------- - func MatchmakerMatched( ctx context.Context, logger runtime.Logger, @@ -36,8 +35,8 @@ func MatchmakerMatched( mode, okMode := props0["mode"].(string) if !okGame || !okMode { - logger.Warn("MatchmakerMatched: Missing 'game' or 'mode' properties.") - return "", nil + logger.Error("MatchmakerMatched: Missing 'game' or 'mode' properties.") + return "", runtime.NewError("missing matchmaking properties", 3) } // Ensure ALL players match game + mode @@ -57,10 +56,11 @@ func MatchmakerMatched( // This depends on how "game" was registered in main.go. // Example: initializer.RegisterMatch("tictactoe", NewGenericMatch(TicTacToeRules)) matchParams := map[string]interface{}{ + "game": game, "mode": mode, } - matchID, err := nk.MatchCreate(ctx, game, matchParams) + matchID, err := nk.MatchCreate(ctx, "generic", matchParams) if err != nil { logger.Error("MatchmakerMatched: MatchCreate failed: %v", err) return "", runtime.NewError("failed to create match", 13)