diff --git a/lua/gmod_integration/client/cl_gui_admin.lua b/lua/gmod_integration/client/cl_gui_admin.lua index b48af01..72ad4e0 100644 --- a/lua/gmod_integration/client/cl_gui_admin.lua +++ b/lua/gmod_integration/client/cl_gui_admin.lua @@ -122,9 +122,10 @@ function gmInte.openConfigMenu(data) ["label"] = gmInte.getTranslation("admin.force_player_link", "Force Player Verif"), ["description"] = gmInte.getTranslation("admin.force_player_link_description", "Force player verification."), ["type"] = "checkbox", + ["reloadOnEdit"] = true, ["value"] = function(setting, value) return value end, ["onEdit"] = function(setting, value) saveConfig(setting, value) end, - ["category"] = gmInte.getTranslation("admin.main", "Main") + ["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety") }, { ["id"] = "supportLink", @@ -136,6 +137,42 @@ function gmInte.openConfigMenu(data) ["onEditDelay"] = 0.5, ["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety") }, + { + ["id"] = "verifyOnJoin", + ["label"] = gmInte.getTranslation("admin.verify_on_join", "Verify on Join"), + ["description"] = gmInte.getTranslation("admin.verify_on_join_description", "Verify the player when they join the server or on player ready."), + ["type"] = "checkbox", + ["condition"] = function(data) return data.forcePlayerLink end, + ["value"] = function(setting, value) return value end, + ["onEdit"] = function(setting, value) saveConfig(setting, value) end, + ["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety") + }, + { + ["id"] = "verifyOnReadyKickTime", + ["label"] = gmInte.getTranslation("admin.verify_on_ready_kick_time", "Kick Time if not Verified"), + ["description"] = gmInte.getTranslation("admin.verify_on_ready_kick_time_description", "Time in seconds before kicking a player that is not verified."), + ["type"] = "textEntry", + ["condition"] = function(data) return data.forcePlayerLink end, + ["value"] = function(setting, value) return value end, + ["onEdit"] = function(setting, value) saveConfig(setting, value) end, + ["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety") + }, + { + ["id"] = "clientBranch", + ["label"] = gmInte.getTranslation("admin.client_force_branch", "Client Force Branch"), + ["description"] = gmInte.getTranslation("admin.client_force_branch_description", "The branch of the addon that the clients should use."), + ["type"] = "combo", + ["condition"] = function(data) return data.forcePlayerLink end, + ["value"] = function(setting, value) return value end, + ["onEdit"] = function(setting, value) saveConfig(setting, value) end, + ["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety"), + ["values"] = { + ["any"] = "Any", + ["dev"] = "Dev", + ["prerelease"] = "Prerelease", + ["x86-64"] = "x86-64", + } + }, { ["id"] = "debug", ["label"] = gmInte.getTranslation("admin.debug", "Debug"), @@ -241,6 +278,7 @@ function gmInte.openConfigMenu(data) // Sort by position table.sort(categoryConfig, function(a, b) return (a.position || 0) < (b.position || 0) end) for k, actualConfig in ipairs(categoryConfig) do + if actualConfig.condition && !actualConfig.condition(data) then continue end local panel = vgui.Create("DPanel", configList) panel:Dock(TOP) panel:SetSize(300, 25) @@ -282,6 +320,10 @@ function gmInte.openConfigMenu(data) input.OnSelect = function(self, index, value) if actualConfig.restart then needRestart = true end actualConfig.onEdit(actualConfig.id, value == gmInte.getTranslation("admin.enabled", "Enabled") && true || false) + if actualConfig.reloadOnEdit then + frame:Close() + RunConsoleCommand("gmi_admin") + end end elseif actualConfig.type == "combo" then input = vgui.Create("DComboBox", panel) @@ -292,7 +334,7 @@ function gmInte.openConfigMenu(data) input:AddChoice(v, k) end - input:SetText(actualConfig.values[data[actualConfig.id]] || actualConfig.values[actualConfig.defaultValue]) + input:SetText(actualConfig.values[data[actualConfig.id]] || actualConfig.values[actualConfig.defaultValue] || "") input.OnSelect = function(self, index, value) if actualConfig.restart then needRestart = true end actualConfig.onEdit(actualConfig.id, posibilities[index]) diff --git a/lua/gmod_integration/client/cl_gui_wrong_branch.lua b/lua/gmod_integration/client/cl_gui_wrong_branch.lua new file mode 100644 index 0000000..0ce40ad --- /dev/null +++ b/lua/gmod_integration/client/cl_gui_wrong_branch.lua @@ -0,0 +1,29 @@ +function gmInte.openWrongBranchPopup() + local frame = vgui.Create("DFrame") + frame:SetSize(400, 260) + frame:Center() + frame:SetTitle("Gmod Integration - " .. gmInte.getTranslation("branch.title", "Wrong Branch")) + frame:SetDraggable(false) + frame:ShowCloseButton(false) + frame:MakePopup() + gmInte.applyPaint(frame) + local messageLabel = vgui.Create("DLabel", frame) + messageLabel:Dock(FILL) + messageLabel:DockMargin(10, 0, 10, 0) + messageLabel:SetText(gmInte.getTranslation("branch.description", "Hey,\nThis server doesn't not allow your game version '{1}' to join. Please switch to '{2}' in the beta tab of Garry's Mod properties.\n\nSteam -> Library -> Garry's Mod -> Right Click -> Properties -> Betas -> Select '{3}'" .. "\n\nAfter you've done that, exit Garry's Mod and rejoin the server.", {BRANCH, gmInte.config.clientBranch, gmInte.config.clientBranch})) + messageLabel:SetContentAlignment(5) + messageLabel:SetFont("GmodIntegration_Roboto_16") + messageLabel:SetWrap(true) + local buttonGrid = vgui.Create("DGrid", frame) + buttonGrid:Dock(BOTTOM) + buttonGrid:DockMargin(10, 0, 10, 10) + buttonGrid:SetCols(2) + buttonGrid:SetColWide(frame:GetWide() - 20) + buttonGrid:SetRowHeight(35) + local linkButton = vgui.Create("DButton") + linkButton:SetText(gmInte.getTranslation("branch.watchTutorial", "Watch Tutorial")) + linkButton.DoClick = function() gui.OpenURL("https://www.youtube.com/watch?v=iklZMVnGyQQ") end + linkButton:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight()) + buttonGrid:AddItem(linkButton) + gmInte.applyPaint(linkButton) +end \ No newline at end of file diff --git a/lua/gmod_integration/client/cl_hook.lua b/lua/gmod_integration/client/cl_hook.lua index c473ad5..6663821 100644 --- a/lua/gmod_integration/client/cl_hook.lua +++ b/lua/gmod_integration/client/cl_hook.lua @@ -1,4 +1,9 @@ -hook.Add("InitPostEntity", "gmInte:Ply:Ready", function() gmInte.SendNet("ready") end) +hook.Add("InitPostEntity", "gmInte:Ply:Ready", function() + gmInte.SendNet("ready", { + ["branch"] = LocalPlayer():gmInteGetBranch() + }) +end) + hook.Add("OnPlayerChat", "gmInte:OnPlayerChat:AdminCmd", function(ply, strText, bTeamOnly, bPlayerIsDead) if ply != LocalPlayer() then return end strText = string.lower(strText) diff --git a/lua/gmod_integration/client/cl_net.lua b/lua/gmod_integration/client/cl_net.lua index e5004b5..8fd7c21 100644 --- a/lua/gmod_integration/client/cl_net.lua +++ b/lua/gmod_integration/client/cl_net.lua @@ -24,6 +24,7 @@ local netReceive = { gmInte.config = table.Merge(gmInte.config, data.config) gmInte.version = data.other.version gmInte.loadTranslations() + if gmInte.config.clientBranch != "any" && gmInte.config.clientBranch != BRANCH then gmInte.openWrongBranchPopup() end if !data.other.aprovedCredentials then RunConsoleCommand("gmod_integration_admin") end end, [6] = function(data) gmInte.chatAddTextFromTable(data) end, diff --git a/lua/gmod_integration/server/sv_filtrers.lua b/lua/gmod_integration/server/sv_filtrers.lua index 54f5c6f..99d5278 100644 --- a/lua/gmod_integration/server/sv_filtrers.lua +++ b/lua/gmod_integration/server/sv_filtrers.lua @@ -33,25 +33,48 @@ local function checkPlayerFilter(code, body, data) if !checkDiscordBanStatus(body.discord_ban) then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.discord_ban", "You are banned from our discord server."))) end end +local function checkPlayerIsLink(code, body, data) + if !body then return end + if !body.discordID then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.link", "You need to link your discord account before joining, verify your account on {1}", "https://gmod-integration.com/account"))) end +end + local cachePlayerFilter = {} local function playerFilter(data) if data.bot == 1 then return end data.steamID64 = util.SteamIDTo64(data.networkid) + cachePlayerFilter[data.steamID64] = cachePlayerFilter[data.steamID64] || {} local cachedData = cachePlayerFilter[data.steamID64] - if cachedData && cachedData.curTime + 30 > CurTime() then - checkPlayerFilter(cachedData.code, cachedData.body, data) - return + // Check if player is banned + if !cachedData || !cachedData.filterData || cachedData.filterData.curTime + 30 < CurTime() then + gmInte.http.get("/servers/:serverID/players/" .. data.steamID64, function(code, body) + cachePlayerFilter[data.steamID64].filterData = { + ["code"] = code, + ["body"] = body, + ["curTime"] = CurTime() + } + + checkPlayerFilter(code, body, data) + end, function(code, body) if gmInte.config.maintenance then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.maintenance", "The server is currently under maintenance and you are not whitelisted."))) end end) + else + checkPlayerFilter(cachedData.filterData.code, cachedData.filterData.body, data) end - gmInte.http.get("/servers/:serverID/players/" .. data.steamID64, function(code, body) - cachePlayerFilter[data.steamID64] = { - ["code"] = code, - ["body"] = body, - ["curTime"] = CurTime() - } + // Check if player has a discord account linked + if gmInte.config.forcePlayerLink && gmInte.config.verifyOnJoin then + if !cachedData || !cachedData.isLinkData || cachedData.isLinkData.curTime + 30 < CurTime() then + gmInte.http.get("/users/:steamID64", function(code, body) + cachePlayerFilter[data.steamID64].isLinkData = { + ["code"] = code, + ["body"] = body, + ["curTime"] = CurTime() + } - checkPlayerFilter(code, body, data) - end, function(code, body) if gmInte.config.maintenance then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.maintenance", "The server is currently under maintenance and you are not whitelisted."))) end end) + checkPlayerIsLink(code, body, data) + end, function(code, body) if code == 404 then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.link", "You need to link your discord account before joining, verify your account on {1}", "https://gmod-integration.com/account"))) end end) + else + checkPlayerIsLink(cachedData.isLinkData.code, cachedData.isLinkData.body, data) + end + end end gameevent.Listen("player_connect") diff --git a/lua/gmod_integration/server/sv_net.lua b/lua/gmod_integration/server/sv_net.lua index d4be3c1..4eff647 100644 --- a/lua/gmod_integration/server/sv_net.lua +++ b/lua/gmod_integration/server/sv_net.lua @@ -24,7 +24,10 @@ function gmInte.SendNet(id, data, ply, func) end local netReceive = { - [0] = function(ply) hook.Run("gmInte:PlayerReady", ply) end, + [0] = function(ply, data) + ply.branch = data.branch + hook.Run("gmInte:PlayerReady", ply) + end, [1] = function(ply, data) gmInte.testConnection(ply, data) end, [2] = function(ply) gmInte.superadminGetConfig(ply) end, [3] = function(ply, data) gmInte.superadminSetConfig(ply, data) end, diff --git a/lua/gmod_integration/server/sv_players_verif.lua b/lua/gmod_integration/server/sv_players_verif.lua index 8193d1e..abc5cac 100644 --- a/lua/gmod_integration/server/sv_players_verif.lua +++ b/lua/gmod_integration/server/sv_players_verif.lua @@ -1,9 +1,13 @@ +gmInte.plyInVerifQueue = gmInte.plyInVerifQueue || {} function gmInte.verifyPlayer(ply) + if !gmInte.config.forcePlayerLink then return end if !ply:IsValid() || !ply:IsPlayer(ply) then return end + ply:Freeze(true) gmInte.http.get("/users?steamID64=" .. ply:SteamID64(), function(code, data) if data && data.discordID then ply.gmIntVerified = true end if !gmInte.config.forcePlayerLink || !ply.gmIntIsReady then return end if ply:gmIntIsVerified() then + gmInte.plyInVerifQueue[ply:SteamID64()] = nil gmInte.SendNet("chatColorMessage", { [1] = { ["text"] = gmInte.getTranslation("verification.success", "You have been verified"), @@ -13,6 +17,7 @@ function gmInte.verifyPlayer(ply) ply:Freeze(false) else + gmInte.plyInVerifQueue[ply:SteamID64()] = ply gmInte.SendNet("chatColorMessage", { [1] = { ["text"] = gmInte.getTranslation("verification.fail", "Failed to verify you"), @@ -24,6 +29,7 @@ function gmInte.verifyPlayer(ply) gmInte.SendNet("openVerifPopup", nil, ply) end end, function(code, data) + gmInte.plyInVerifQueue[ply:SteamID64()] = ply ply:Freeze(true) gmInte.SendNet("chatColorMessage", { [1] = { @@ -36,9 +42,50 @@ function gmInte.verifyPlayer(ply) end) end +gmInte.plyInVerifBranchQueue = gmInte.plyInVerifBranchQueue || {} +function gmInte.verifyPlayerBranch(ply) + if gmInte.config.clientBranch == "any" then return end + if !ply:IsValid() || !ply:IsPlayer(ply) then return end + ply:Freeze(true) + gmInte.plyInVerifBranchQueue[ply:SteamID64()] = ply +end + hook.Add("gmInte:PlayerReady", "gmInte:Verif:PlayerReady", function(ply) ply.gmIntIsReady = true - if !gmInte.config.forcePlayerLink then return end - ply:Freeze(true) gmInte.verifyPlayer(ply) + gmInte.verifyPlayerBranch(ply) +end) + +// Routine to check the verification of players and kick them if they don't verify +timer.Create("gmInte:Verif:Check:forcePlayerLink", 30, 0, function() + if !gmInte.config.forcePlayerLink || gmInte.config.verifyOnReadyKickTime == 0 then return end + for steamID64, ply in pairs(gmInte.plyInVerifQueue) do + if !ply:IsValid() || !ply:IsPlayer(ply) then continue end + local connectTime = math.Round(RealTime() - ply:gmIntGetConnectTime()) + gmInte.SendNet("chatColorMessage", { + [1] = { + ["text"] = gmInte.getTranslation("verification.kick_in", "If you don't verify in {1} seconds you will be kicked", gmInte.config.verifyOnReadyKickTime - connectTime), + ["color"] = Color(224, 89, 89) + } + }, ply) + + if connectTime >= gmInte.config.verifyOnReadyKickTime then ply:Kick(gmInte.getTranslation("verification.kick", "You have been kicked for not verifying, verify your account on {1}", "https://gmod-integration.com/account")) end + gmInte.plyInVerifQueue[ply:SteamID64()] = nil + end +end) + +timer.Create("gmInte:Verif:Check:forcePlayerBranch", 30, 0, function() + if gmInte.config.clientBranch == "any" then return end + for steamID64, ply in pairs(gmInte.plyInVerifBranchQueue) do + if !ply:IsValid() || !ply:IsPlayer(ply) then continue end + local connectTime = math.Round(RealTime() - ply:gmIntGetConnectTime()) + gmInte.SendNet("chatColorMessage", { + [1] = { + ["text"] = gmInte.getTranslation("verification.kick_in_branch", "If you don't change your branch in {1} seconds you will be kicked", (gmInte.config.verifyOnReadyKickTime != 0 && gmInte.config.verifyOnReadyKickTime || 600) - connectTime), + ["color"] = Color(224, 89, 89) + } + }, ply) + + if connectTime >= (gmInte.config.verifyOnReadyKickTime != 0 && gmInte.config.verifyOnReadyKickTime || 600) then ply:Kick(gmInte.getTranslation("verification.kick_branch", "You have been kicked for not changing your branch to {1}", gmInte.config.clientBranch)) end + end end) \ No newline at end of file diff --git a/lua/gmod_integration/server/sv_settings.lua b/lua/gmod_integration/server/sv_settings.lua index 735efef..6defd39 100644 --- a/lua/gmod_integration/server/sv_settings.lua +++ b/lua/gmod_integration/server/sv_settings.lua @@ -1,6 +1,6 @@ function gmInte.saveSetting(setting, value) if gmInte.config[setting] == nil then - gmInte.log("Unknown Setting") + gmInte.log("Unknown Setting " .. setting) return end @@ -63,7 +63,8 @@ function gmInte.publicGetConfig(ply) ["apiFQDN"] = gmInte.config.apiFQDN, ["websocketFQDN"] = gmInte.config.websocketFQDN, ["adminRank"] = gmInte.config.adminRank, - ["language"] = gmInte.config.language + ["language"] = gmInte.config.language, + ["clientBranch"] = gmInte.config.clientBranch }, ["other"] = { ["aprovedCredentials"] = gmInte.aprovedCredentials, diff --git a/lua/gmod_integration/shared/languages/sh_de.lua b/lua/gmod_integration/shared/languages/sh_de.lua index 68dd11e..f09af51 100644 --- a/lua/gmod_integration/shared/languages/sh_de.lua +++ b/lua/gmod_integration/shared/languages/sh_de.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "De server is momenteel in onderhoud en je staat niet op de whitelist.", ["filter.ban"] = "Je bent verbannen van deze server.", ["filter.discord_ban"] = "Je bent verbannen van onze Discord-server.", + ["branch.title"] = "Falscher Branch", + ["branch.description"] = "Hey,\nDieser Server erlaubt deine Spielversion '{1}' nicht. Bitte wechsle zu '{2}' im Beta-Tab der Garry's Mod-Eigenschaften.\n\nSteam -> Bibliothek -> Garry's Mod -> Rechtsklick -> Eigenschaften -> Betas -> Wähle '{3}'" .. "\n\nNachdem du das getan hast, beende Garry's Mod und trete dem Server erneut bei.", + ["branch.watchTutorial"] = "Tutorial ansehen", + ["admin.verify_on_join"] = "Beim Beitritt verifizieren", + ["admin.verify_on_join_description"] = "Verifiziere den Spieler, wenn er dem Server beitritt oder wenn der Spieler bereit ist.", + ["admin.verify_on_ready_kick_time"] = "Kick-Zeit, wenn nicht verifiziert", + ["admin.verify_on_ready_kick_time_description"] = "Zeit in Sekunden, bevor ein nicht verifizierter Spieler gekickt wird.", + ["admin.client_force_branch"] = "Client-Zweig erzwingen", + ["admin.client_force_branch_description"] = "Der Zweig des Addons, den die Clients verwenden sollen.", + ["filter.link"] = "Du musst dein Discord-Konto verknüpfen, bevor du beitreten kannst. Verifiziere dein Konto auf {1}", + ["verification.kick_in"] = "Wenn du dich nicht innerhalb von {1} Sekunden verifizierst, wirst du gekickt", + ["verification.kick"] = "Du wurdest gekickt, weil du dich nicht verifiziert hast. Verifiziere dein Konto auf {1}", + ["verification.kick_in_branch"] = "Wenn du deinen Branch nicht innerhalb von {1} Sekunden änderst, wirst du gekickt", + ["verification.kick_branch"] = "Du wurdest gekickt, weil du deinen Branch nicht auf {1} geändert hast", } \ No newline at end of file diff --git a/lua/gmod_integration/shared/languages/sh_en.lua b/lua/gmod_integration/shared/languages/sh_en.lua index a1a62b3..fb35445 100644 --- a/lua/gmod_integration/shared/languages/sh_en.lua +++ b/lua/gmod_integration/shared/languages/sh_en.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "The server is currently under maintenance and you are not whitelisted.", ["filter.ban"] = "You are banned from this server.", ["filter.discord_ban"] = "You are banned from our discord server.", + ["branch.title"] = "Wrong Branch", + ["branch.description"] = "Hey,\nThis server doesn't not allow your game version '{1}' to join. Please switch to '{2}' in the beta tab of Garry's Mod properties.\n\nSteam -> Library -> Garry's Mod -> Right Click -> Properties -> Betas -> Select '{3}'" .. "\n\nAfter you've done that, exit Garry's Mod and rejoin the server.", + ["branch.watchTutorial"] = "Watch Tutorial", + ["admin.verify_on_join"] = "Verify on Join", + ["admin.verify_on_join_description"] = "Verify the player when they join the server or on player ready.", + ["admin.verify_on_ready_kick_time"] = "Kick Time if not Verified", + ["admin.verify_on_ready_kick_time_description"] = "Time in seconds before kicking a player that is not verified.", + ["admin.client_force_branch"] = "Client Force Branch", + ["admin.client_force_branch_description"] = "The branch of the addon that the clients should use.", + ["filter.link"] = "You need to link your discord account before joining, verify your account on {1}", + ["verification.kick_in"] = "If you don't verify in {1} seconds you will be kicked", + ["verification.kick"] = "You have been kicked for not verifying, verify your account on {1}", + ["verification.kick_in_branch"] = "If you don't change your branch in {1} seconds you will be kicked", + ["verification.kick_branch"] = "You have been kicked for not changing your branch to {1}", } \ No newline at end of file diff --git a/lua/gmod_integration/shared/languages/sh_es.lua b/lua/gmod_integration/shared/languages/sh_es.lua index 87bde10..e964e11 100644 --- a/lua/gmod_integration/shared/languages/sh_es.lua +++ b/lua/gmod_integration/shared/languages/sh_es.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "El servidor está actualmente en mantenimiento y no estás en la lista blanca.", ["filter.ban"] = "Estás baneado de este servidor.", ["filter.discord_ban"] = "Estás baneado de nuestro servidor de Discord.", + ["branch.title"] = "Rama Incorrecta", + ["branch.description"] = "Hola,\nEste servidor no permite tu versión del juego '{1}' para unirse. Por favor, cambia a '{2}' en la pestaña beta de las propiedades de Garry's Mod.\n\nSteam -> Biblioteca -> Garry's Mod -> Clic Derecho -> Propiedades -> Betas -> Seleccionar '{3}'" .. "\n\nDespués de hacer eso, cierra Garry's Mod y vuelve a unirte al servidor.", + ["branch.watchTutorial"] = "Ver Tutorial", + ["admin.verify_on_join"] = "Verificar al Unirse", + ["admin.verify_on_join_description"] = "Verificar al jugador cuando se une al servidor o cuando el jugador está listo.", + ["admin.verify_on_ready_kick_time"] = "Tiempo de Expulsión si no Verificado", + ["admin.verify_on_ready_kick_time_description"] = "Tiempo en segundos antes de expulsar a un jugador que no está verificado.", + ["admin.client_force_branch"] = "Forzar Rama del Cliente", + ["admin.client_force_branch_description"] = "La rama del addon que los clientes deben usar.", + ["filter.link"] = "Necesitas vincular tu cuenta de Discord antes de unirte, verifica tu cuenta en {1}", + ["verification.kick_in"] = "Si no verificas en {1} segundos serás expulsado", + ["verification.kick"] = "Has sido expulsado por no verificar, verifica tu cuenta en {1}", + ["verification.kick_in_branch"] = "Si no cambias tu rama en {1} segundos serás expulsado", + ["verification.kick_branch"] = "Has sido expulsado por no cambiar tu rama a {1}", } \ No newline at end of file diff --git a/lua/gmod_integration/shared/languages/sh_fr.lua b/lua/gmod_integration/shared/languages/sh_fr.lua index edfb1e3..7ff7636 100644 --- a/lua/gmod_integration/shared/languages/sh_fr.lua +++ b/lua/gmod_integration/shared/languages/sh_fr.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "Le serveur est actuellement en maintenance et vous n'êtes pas sur la liste blanche.", ["filter.ban"] = "Vous êtes banni de ce serveur.", ["filter.discord_ban"] = "Vous êtes banni de notre serveur Discord.", + ["branch.title"] = "Mauvaise Branche", + ["branch.description"] = "Salut,\nCe serveur n'autorise pas votre version du jeu '{1}' à se connecter. Veuillez passer à '{2}' dans l'onglet bêta des propriétés de Garry's Mod.\n\nSteam -> Bibliothèque -> Garry's Mod -> Clic droit -> Propriétés -> Bêtas -> Sélectionnez '{3}'" .. "\n\nAprès avoir fait cela, quittez Garry's Mod et rejoignez le serveur.", + ["branch.watchTutorial"] = "Regarder le tutoriel", + ["admin.verify_on_join"] = "Vérifier à la connexion", + ["admin.verify_on_join_description"] = "Vérifier le joueur lorsqu'il rejoint le serveur ou lorsqu'il est prêt.", + ["admin.verify_on_ready_kick_time"] = "Temps avant expulsion si non vérifié", + ["admin.verify_on_ready_kick_time_description"] = "Temps en secondes avant d'expulser un joueur qui n'est pas vérifié.", + ["admin.client_force_branch"] = "Forcer la branche du client", + ["admin.client_force_branch_description"] = "La branche de l'addon que les clients doivent utiliser.", + ["filter.link"] = "Vous devez lier votre compte Discord avant de rejoindre, vérifiez votre compte sur {1}", + ["verification.kick_in"] = "Si vous ne vérifiez pas dans {1} secondes, vous serez expulsé", + ["verification.kick"] = "Vous avez été expulsé pour ne pas avoir vérifié, vérifiez votre compte sur {1}", + ["verification.kick_in_branch"] = "Si vous ne changez pas de branche dans {1} secondes, vous serez expulsé", + ["verification.kick_branch"] = "Vous avez été expulsé pour ne pas avoir changé votre branche en {1}", } \ No newline at end of file diff --git a/lua/gmod_integration/shared/languages/sh_it.lua b/lua/gmod_integration/shared/languages/sh_it.lua index cf6cc81..94eff05 100644 --- a/lua/gmod_integration/shared/languages/sh_it.lua +++ b/lua/gmod_integration/shared/languages/sh_it.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "Il server è attualmente in manutenzione e non sei in whitelist.", ["filter.ban"] = "Sei stato bannato da questo server.", ["filter.discord_ban"] = "Sei stato bannato dal nostro server Discord.", + ["branch.title"] = "Branch Errato", + ["branch.description"] = "Ciao,\nQuesto server non permette la tua versione del gioco '{1}' di unirsi. Per favore, passa a '{2}' nella scheda beta delle proprietà di Garry's Mod.\n\nSteam -> Libreria -> Garry's Mod -> Clic Destro -> Proprietà -> Betas -> Seleziona '{3}'" .. "\n\nDopo averlo fatto, esci da Garry's Mod e rientra nel server.", + ["branch.watchTutorial"] = "Guarda Tutorial", + ["admin.verify_on_join"] = "Verifica all'Ingresso", + ["admin.verify_on_join_description"] = "Verifica il giocatore quando si unisce al server o quando è pronto.", + ["admin.verify_on_ready_kick_time"] = "Tempo di Kick se non Verificato", + ["admin.verify_on_ready_kick_time_description"] = "Tempo in secondi prima di espellere un giocatore che non è verificato.", + ["admin.client_force_branch"] = "Forza Branch Client", + ["admin.client_force_branch_description"] = "Il branch dell'addon che i client dovrebbero usare.", + ["filter.link"] = "Devi collegare il tuo account Discord prima di unirti, verifica il tuo account su {1}", + ["verification.kick_in"] = "Se non verifichi entro {1} secondi sarai espulso", + ["verification.kick"] = "Sei stato espulso per non aver verificato, verifica il tuo account su {1}", + ["verification.kick_in_branch"] = "Se non cambi il tuo branch entro {1} secondi sarai espulso", + ["verification.kick_branch"] = "Sei stato espulso per non aver cambiato il tuo branch a {1}", } \ No newline at end of file diff --git a/lua/gmod_integration/shared/languages/sh_pl.lua b/lua/gmod_integration/shared/languages/sh_pl.lua index 363530d..c0a0ea6 100644 --- a/lua/gmod_integration/shared/languages/sh_pl.lua +++ b/lua/gmod_integration/shared/languages/sh_pl.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "Serwer jest obecnie w trybie konserwacji i nie jesteś na białej liście.", ["filter.ban"] = "Jesteś zbanowany na tym serwerze.", ["filter.discord_ban"] = "Jesteś zbanowany na naszym serwerze discord.", + ["branch.title"] = "Zła Gałąź", + ["branch.description"] = "Hej,\nTen serwer nie pozwala na dołączenie twojej wersji gry '{1}'. Proszę przełączyć się na '{2}' w zakładce beta właściwości Garry's Mod.\n\nSteam -> Biblioteka -> Garry's Mod -> Prawy Klik -> Właściwości -> Betas -> Wybierz '{3}'" .. "\n\nPo wykonaniu tego, wyjdź z Garry's Mod i dołącz ponownie do serwera.", + ["branch.watchTutorial"] = "Obejrzyj Tutorial", + ["admin.verify_on_join"] = "Weryfikacja przy Dołączeniu", + ["admin.verify_on_join_description"] = "Zweryfikuj gracza, gdy dołączy do serwera lub gdy jest gotowy.", + ["admin.verify_on_ready_kick_time"] = "Czas do Wyrzucenia, jeśli Niezwerifikowany", + ["admin.verify_on_ready_kick_time_description"] = "Czas w sekundach przed wyrzuceniem gracza, który nie jest zweryfikowany.", + ["admin.client_force_branch"] = "Wymuszona Gałąź Klienta", + ["admin.client_force_branch_description"] = "Gałąź dodatku, której powinni używać klienci.", + ["filter.link"] = "Musisz powiązać swoje konto Discord przed dołączeniem, zweryfikuj swoje konto na {1}", + ["verification.kick_in"] = "Jeśli nie zweryfikujesz się w ciągu {1} sekund, zostaniesz wyrzucony", + ["verification.kick"] = "Zostałeś wyrzucony za brak weryfikacji, zweryfikuj swoje konto na {1}", + ["verification.kick_in_branch"] = "Jeśli nie zmienisz swojej gałęzi w ciągu {1} sekund, zostaniesz wyrzucony", + ["verification.kick_branch"] = "Zostałeś wyrzucony za brak zmiany gałęzi na {1}", } diff --git a/lua/gmod_integration/shared/languages/sh_ru.lua b/lua/gmod_integration/shared/languages/sh_ru.lua index cd57c87..eaee0c8 100644 --- a/lua/gmod_integration/shared/languages/sh_ru.lua +++ b/lua/gmod_integration/shared/languages/sh_ru.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "Сервер в настоящее время находится на техническом обслуживании, и вы не включены в белый список.", ["filter.ban"] = "Вы забанены на этом сервере.", ["filter.discord_ban"] = "Вы забанены на нашем сервере Discord.", + ["branch.title"] = "Неправильная ветка", + ["branch.description"] = "Привет,\nЭтот сервер не позволяет вашей версии игры '{1}' присоединиться. Пожалуйста, переключитесь на '{2}' во вкладке бета-версий в свойствах Garry's Mod.\n\nSteam -> Библиотека -> Garry's Mod -> Правый клик -> Свойства -> Бета-версии -> Выберите '{3}'" .. "\n\nПосле этого выйдите из Garry's Mod и снова присоединитесь к серверу.", + ["branch.watchTutorial"] = "Смотреть учебник", + ["admin.verify_on_join"] = "Верификация при входе", + ["admin.verify_on_join_description"] = "Верифицировать игрока при его входе на сервер или при готовности игрока.", + ["admin.verify_on_ready_kick_time"] = "Время до кика, если не верифицирован", + ["admin.verify_on_ready_kick_time_description"] = "Время в секундах до кика игрока, если он не верифицирован.", + ["admin.client_force_branch"] = "Принудительная ветка клиента", + ["admin.client_force_branch_description"] = "Ветка аддона, которую должны использовать клиенты.", + ["filter.link"] = "Вам нужно связать свою учетную запись Discord перед присоединением, верифицируйте свою учетную запись на {1}", + ["verification.kick_in"] = "Если вы не верифицируетесь в течение {1} секунд, вас кикнут", + ["verification.kick"] = "Вы были кикнуты за отсутствие верификации, верифицируйте свою учетную запись на {1}", + ["verification.kick_in_branch"] = "Если вы не смените ветку в течение {1} секунд, вас кикнут", + ["verification.kick_branch"] = "Вы были кикнуты за несмену ветки на {1}", } \ No newline at end of file diff --git a/lua/gmod_integration/shared/languages/sh_tr.lua b/lua/gmod_integration/shared/languages/sh_tr.lua index ed1aa2c..34aa609 100644 --- a/lua/gmod_integration/shared/languages/sh_tr.lua +++ b/lua/gmod_integration/shared/languages/sh_tr.lua @@ -85,4 +85,18 @@ return { ["filter.maintenance"] = "Sunucu şu anda bakım altında ve sizin whitelistinizde değilsiniz.", ["filter.ban"] = "Bu sunucudan yasaklandınız.", ["filter.discord_ban"] = "Discord sunucumuzdan yasaklandınız.", + ["branch.title"] = "Yanlış Dal", + ["branch.description"] = "Merhaba,\nBu sunucu oyun sürümünüz '{1}' ile katılmanıza izin vermiyor. Lütfen Garry's Mod özelliklerinin beta sekmesinde '{2}' olarak değiştirin.\n\nSteam -> Kütüphane -> Garry's Mod -> Sağ Tıkla -> Özellikler -> Betalar -> '{3}' Seçin" .. "\n\nBunu yaptıktan sonra, Garry's Mod'dan çıkın ve sunucuya yeniden katılın.", + ["branch.watchTutorial"] = "Eğitimi İzle", + ["admin.verify_on_join"] = "Katıldığında Doğrula", + ["admin.verify_on_join_description"] = "Oyuncu sunucuya katıldığında veya oyuncu hazır olduğunda doğrulayın.", + ["admin.verify_on_ready_kick_time"] = "Doğrulanmazsa Atılma Süresi", + ["admin.verify_on_ready_kick_time_description"] = "Doğrulanmamış bir oyuncuyu atmadan önceki süre (saniye cinsinden).", + ["admin.client_force_branch"] = "İstemci Zorunlu Dal", + ["admin.client_force_branch_description"] = "İstemcilerin kullanması gereken eklenti dalı.", + ["filter.link"] = "Katılmadan önce discord hesabınızı bağlamanız gerekiyor, hesabınızı {1} üzerinde doğrulayın", + ["verification.kick_in"] = "{1} saniye içinde doğrulamazsanız atılacaksınız", + ["verification.kick"] = "Doğrulamadığınız için atıldınız, hesabınızı {1} üzerinde doğrulayın", + ["verification.kick_in_branch"] = "{1} saniye içinde dalınızı değiştirmezseniz atılacaksınız", + ["verification.kick_branch"] = "Dalınızı {1} olarak değiştirmediğiniz için atıldınız", } \ No newline at end of file diff --git a/lua/gmod_integration/shared/sh_api_format.lua b/lua/gmod_integration/shared/sh_api_format.lua index 41418b4..f13af6e 100644 --- a/lua/gmod_integration/shared/sh_api_format.lua +++ b/lua/gmod_integration/shared/sh_api_format.lua @@ -5,6 +5,7 @@ function gmInte.getPlayerFormat(ply) ["steamID64"] = ply:SteamID64(), ["userGroup"] = ply:GetUserGroup(), ["team"] = gmInte.getTeamFormat(ply:Team()), + ["branch"] = ply:gmInteGetBranch(), ["name"] = ply:Nick(), ["kills"] = ply:Frags(), ["deaths"] = ply:Deaths(),