Skip to content

Commit 86375c4

Browse files
authored
Fix minclientversion checker for MTA 1.6 and on. (#521)
1 parent 4674fa9 commit 86375c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

[admin]/acpanel/s_settings.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,16 @@ end
198198
-- Get version data from remote server
199199
---------------------------------------------------------
200200
function GetVersInfoFromRemoteServer()
201-
fetchRemote( "http://nightly.mtasa.com/ver/", onGotVersInfo )
201+
fetchRemote( "https://nightly.multitheftauto.com/ver/", onGotVersInfo )
202202
end
203203

204204
function onGotVersInfo( responseData, errno )
205205
if errno == 0 then
206206

207-
local ver = string.sub( getVersion().sortable, 0, 3 )
207+
local ver = string.sub( getVersion().sortable, 1, 3 )
208208

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

212212
if releaseMinVersion and latestMinVersion then
213213
releaseMinVersion = ver .. "." .. releaseMinVersion

0 commit comments

Comments
 (0)