From ead7ad2c35f62feb44af36ba569a67c55b1ae640 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Thu, 27 Nov 2025 16:10:04 +0530 Subject: [PATCH] added check for allowing only class and blitz game mode at server --- plugins/matchmaking.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/matchmaking.go b/plugins/matchmaking.go index ad8d726..1b47222 100644 --- a/plugins/matchmaking.go +++ b/plugins/matchmaking.go @@ -29,11 +29,12 @@ func MatchmakerMatched( propsA := entries[0].GetProperties() propsB := entries[1].GetProperties() + validModes := map[string]bool{"classic": true, "blitz": true} modeA, okA := propsA["mode"].(string) modeB, okB := propsB["mode"].(string) - if !okA || !okB { + if !okA || !okB || !validModes[modeA] || !validModes[modeB] { logger.Warn("MatchmakerMatched missing mode property — ignoring") return "", nil }