idk
This commit is contained in:
		
							parent
							
								
									2d246ddd92
								
							
						
					
					
						commit
						b65a746152
					
				| 
						 | 
				
			
			@ -11,18 +11,18 @@ local function checkForUpdate()
 | 
			
		|||
    --its been considerable time since the keypad was interacted with
 | 
			
		||||
    --therefore it's time to force an update down the users throat (microsoft moment)
 | 
			
		||||
    if difference > .5 then
 | 
			
		||||
        local update_code_request = http.get("https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/keypadOS.lua?x=" .. tostring( math.random(11111111,99999999) )) --I HATE CACHE REEEEEEEEEEEEEEEEE
 | 
			
		||||
        local update_code_request = http.get("https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/keypadOS.lua?x=" .. tostring(math.random(11111111, 99999999))) -- I HATE CACHE REEEEEEEEEEEEEEEEE
 | 
			
		||||
        if update_code_request then
 | 
			
		||||
            local update_code_text = update_code_request.readAll()
 | 
			
		||||
            if update_code_text then
 | 
			
		||||
                if string.find(update_code_text, "^local __BUNDLER_FILES = {}") then
 | 
			
		||||
                    --make backup
 | 
			
		||||
                    fs.copy("startup.lua","backup.lua")
 | 
			
		||||
                    -- Make backup
 | 
			
		||||
                    fs.copy("startup.lua", "backup.lua")
 | 
			
		||||
 | 
			
		||||
                    local startup_file = fs.open("startup.lua", "r")
 | 
			
		||||
                    local startup_contents = startup_file.readAll()
 | 
			
		||||
                    startup_file.close()
 | 
			
		||||
                    
 | 
			
		||||
 | 
			
		||||
                    if update_code_text ~= startup_contents then
 | 
			
		||||
                        local file = fs.open("startup.lua", "w")
 | 
			
		||||
                        file.write(update_code_text)
 | 
			
		||||
| 
						 | 
				
			
			@ -33,13 +33,15 @@ local function checkForUpdate()
 | 
			
		|||
                        LAST_USED = os.time()
 | 
			
		||||
                        return
 | 
			
		||||
                    end
 | 
			
		||||
 | 
			
		||||
                else
 | 
			
		||||
                    print("Bad file download (core)")
 | 
			
		||||
                end
 | 
			
		||||
                print("Bad file download (core)")
 | 
			
		||||
            else
 | 
			
		||||
                print("Bad mem read (core)")
 | 
			
		||||
            end
 | 
			
		||||
            print("Bad mem read (core)")
 | 
			
		||||
        else
 | 
			
		||||
            print("Bad download (core)")
 | 
			
		||||
        end
 | 
			
		||||
        print("Bad download (core)")
 | 
			
		||||
    end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user