diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a9790c4..c5e4df0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: - name: Download GLuaLint run: curl -o glualint.zip -L https://github.com/FPtje/GLuaFixer/releases/download/$GLUALINT_VERSION/glualint-$GLUALINT_VERSION-x86_64-linux.zip env: - GLUALINT_VERSION: 1.24.4 + GLUALINT_VERSION: 1.26.0 - name: Unzip GLuaLint run: unzip glualint.zip - name: Lint lua files diff --git a/lua/autorun/textscreens_util.lua b/lua/autorun/textscreens_util.lua index f6ff873..61e2358 100644 --- a/lua/autorun/textscreens_util.lua +++ b/lua/autorun/textscreens_util.lua @@ -22,47 +22,9 @@ if SERVER then AddCSLuaFile("textscreens_config.lua") include("textscreens_config.lua") CreateConVar("sbox_maxtextscreens", "1", {FCVAR_NOTIFY, FCVAR_REPLICATED}, "Determines the maximum number of textscreens users can spawn.") - CreateConVar("ss_call_to_home", 0, {FCVAR_NOTIFY, FCVAR_REPLICATED}, "Determines whether anonymous usage analytics can be sent to the addon author.", 0, 1) --local rainbow_enabled = cvars.Number('ss_enable_rainbow', 1) - local version = "1.20.1" - - local function GetOS() - if system.IsLinux() then return "linux" end - if system.IsWindows() then return "windows" end - if system.IsOSX() then return "osx" end - return "unknown" - end - - local submitted = false - local function submitAnalytics() - if GetConVar("ss_call_to_home"):GetInt() ~= 1 or submitted then return end - - submitted = true - http.Post("https://jross.me/textscreens/analytics.php", { - ["operating_system"] = GetOS(), - ["server_dedicated"] = game.IsDedicated() and "true" or "false", - ["server_name"] = GetHostName(), - ["server_ip"] = util.CRC(game.GetIPAddress()), - ["version"] = version - }) - end - - -- Set ss_call_to_home to 1 to opt-in to anonymous stat tracking - -- These won't be used for anything other than putting a smile on my face :) - hook.Add("Initialize", "CallToHomeSS", function() - timer.Simple(15, function() - submitAnalytics() - end) - end) - - cvars.AddChangeCallback("ss_call_to_home", function(convar_name, value_old, value_new) - if value_new == "1" then - submitAnalytics() - end - end) - local function StringRandom(int) math.randomseed(os.time()) local s = "" diff --git a/lua/weapons/gmod_tool/stools/textscreen.lua b/lua/weapons/gmod_tool/stools/textscreen.lua index a2a161a..45ff6c3 100644 --- a/lua/weapons/gmod_tool/stools/textscreen.lua +++ b/lua/weapons/gmod_tool/stools/textscreen.lua @@ -165,13 +165,6 @@ function TOOL.BuildCPanel(CPanel) Description = "#tool.textscreen.desc" }) - local analytics = vgui.Create("DCheckBoxLabel", CPanel) - analytics:SetText("Anonymous Analytics") - analytics:SetTextColor(Color(0,0,0,255)) - analytics:SetConVar("ss_call_to_home") - analytics:SetTooltip("Enabling this will submit anonymous analytics to the author of this addon, including your Operating System, version of the addon, and anonymised IP address.") - CPanel:AddItem(analytics) - local function TrimFontName(fontnum) return string.Left(textscreenFonts[fontnum], 8) == "Screens_" and string.TrimLeft(textscreenFonts[fontnum], "Screens_") or textscreenFonts[fontnum] end