Stop interference again
This commit is contained in:
		| @@ -77,7 +77,8 @@ end | |||||||
| while true do | while true do | ||||||
|     util.processMessage(function(m)  |     util.processMessage(function(m)  | ||||||
|         if m.cmd and m.item and m.cmd == "craft" then |         if m.cmd and m.item and m.cmd == "craft" then | ||||||
|             return craft(m.item) |             return true, craft(m.item) | ||||||
|         end |         end | ||||||
|  |         return false | ||||||
|     end) |     end) | ||||||
| end | end | ||||||
| @@ -137,7 +137,7 @@ function processRequests() | |||||||
|             local ok, r = pcall(processRequest, msg) |             local ok, r = pcall(processRequest, msg) | ||||||
|             if not ok then r = "ERROR" end |             if not ok then r = "ERROR" end | ||||||
|  |  | ||||||
|             return r |             return true, r | ||||||
|         end) |         end) | ||||||
|     end |     end | ||||||
| end | end | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								util.lua
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								util.lua
									
									
									
									
									
								
							| @@ -106,8 +106,8 @@ local function split(str, sSeparator, nMax, bRegexp) | |||||||
| local function processMessage(f) | local function processMessage(f) | ||||||
| 	local id, msg = rednet.receive "dragon" | 	local id, msg = rednet.receive "dragon" | ||||||
| 	if msg and msg.uid then | 	if msg and msg.uid then | ||||||
| 		local r = f(msg) | 		local send, response = f(msg) | ||||||
| 		rednet.send(id, { uid = msg.uid, msg = r }, "dragon") | 		if send then rednet.send(id, { uid = msg.uid, msg = response }, "dragon") end | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user