From 89da89fbfe53a586de2a1bf6a1464090260d8919 Mon Sep 17 00:00:00 2001 From: Lonsfor Date: Sat, 14 May 2022 08:04:28 +0200 Subject: [PATCH] Simplify allowJoin() --- leaderboard.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/leaderboard.lua b/leaderboard.lua index 9d3129f..b06f2b5 100644 --- a/leaderboard.lua +++ b/leaderboard.lua @@ -297,16 +297,13 @@ end function allowJoin(v) if not cv_interrupt.value then - local y if v then - y = "yes" + COM_BufInsertText(server, "allowteamchange Yes") hud.enable("freeplay") else - y = "no" + COM_BufInsertText(server, "allowteamchange No") hud.disable("freeplay") end - - COM_BufInsertText(server, "allowteamchange " + y) end end