mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	chore: cleanup and remove extra spaces
This commit is contained in:
		
							parent
							
								
									ce5ac86a4c
								
							
						
					
					
						commit
						14064eceda
					
				
							
								
								
									
										18
									
								
								preload.lua
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								preload.lua
									
									
									
									
									
								
							@ -44,19 +44,19 @@ end)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
do
 | 
					do
 | 
				
			||||||
	local virt_G = { }
 | 
						local virt_G = { }
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	setmetatable(_G, {
 | 
						setmetatable(_G, {
 | 
				
			||||||
		__index = function (self, key)
 | 
							__index = function (_, key)
 | 
				
			||||||
			local got_virt = virt_G[key]
 | 
								local got_virt = virt_G[key]
 | 
				
			||||||
			if got_virt ~= nil then
 | 
								if got_virt ~= nil then
 | 
				
			||||||
				return got_virt
 | 
									return got_virt
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			virt_G[key] = os.getenv(key)
 | 
								virt_G[key] = os.getenv(key)
 | 
				
			||||||
			return virt_G[key]
 | 
								return virt_G[key]
 | 
				
			||||||
		end,
 | 
							end,
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
		__newindex = function (self, key, value)
 | 
							__newindex = function (_, key, value)
 | 
				
			||||||
			if type(value) == 'string' then
 | 
								if type(value) == 'string' then
 | 
				
			||||||
				os.setenv(key, value)
 | 
									os.setenv(key, value)
 | 
				
			||||||
				virt_G[key] = value
 | 
									virt_G[key] = value
 | 
				
			||||||
@ -68,7 +68,7 @@ do
 | 
				
			|||||||
			end
 | 
								end
 | 
				
			||||||
		end,
 | 
							end,
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	bait.catch('command.exit', function ()
 | 
						bait.catch('command.exit', function ()
 | 
				
			||||||
		for key, value in pairs(virt_G) do
 | 
							for key, value in pairs(virt_G) do
 | 
				
			||||||
			if type(value) == 'string' then
 | 
								if type(value) == 'string' then
 | 
				
			||||||
@ -82,15 +82,15 @@ end
 | 
				
			|||||||
function string.split(str, delimiter)
 | 
					function string.split(str, delimiter)
 | 
				
			||||||
	local result = {}
 | 
						local result = {}
 | 
				
			||||||
	local from = 1
 | 
						local from = 1
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local delim_from, delim_to = string.find(str, delimiter, from)
 | 
						local delim_from, delim_to = string.find(str, delimiter, from)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	while delim_from do
 | 
						while delim_from do
 | 
				
			||||||
		table.insert(result, string.sub(str, from, delim_from - 1))
 | 
							table.insert(result, string.sub(str, from, delim_from - 1))
 | 
				
			||||||
		from = delim_to + 1
 | 
							from = delim_to + 1
 | 
				
			||||||
		delim_from, delim_to = string.find(str, delimiter, from)
 | 
							delim_from, delim_to = string.find(str, delimiter, from)
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	table.insert(result, string.sub(str, from))
 | 
						table.insert(result, string.sub(str, from))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return result
 | 
						return result
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user