Skip to content

Commit

Permalink
Fix minclientversion checker for MTA 1.6 and on. (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
YelehaUwU committed Jul 19, 2024
1 parent 4674fa9 commit 86375c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions [admin]/acpanel/s_settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,16 @@ end
-- Get version data from remote server
---------------------------------------------------------
function GetVersInfoFromRemoteServer()
fetchRemote( "http://nightly.mtasa.com/ver/", onGotVersInfo )
fetchRemote( "https://nightly.multitheftauto.com/ver/", onGotVersInfo )
end

function onGotVersInfo( responseData, errno )
if errno == 0 then

local ver = string.sub( getVersion().sortable, 0, 3 )
local ver = string.sub( getVersion().sortable, 1, 3 )

releaseMinVersion = string.match( responseData, "default: " ..ver .. ".(.-)[^0-9.-]" )
latestMinVersion = string.match( responseData, "minclientversion: " .. ver .. ".(.-)[^0-9.-]" )
releaseMinVersion = string.match( responseData, "Auto-update default:%s*" .. ver .. "%.([%d%-%.]+)" )
latestMinVersion = string.match( responseData, "Max recommended/minclientversion:%s*" .. ver .. "%.([%d%-%.]+)" )

if releaseMinVersion and latestMinVersion then
releaseMinVersion = ver .. "." .. releaseMinVersion
Expand Down

0 comments on commit 86375c4

Please sign in to comment.