mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-26 19:37:39 +00:00 
			
		
		
		
	Assorted fixes to rednet, textutils, gps, chat.
As reported by @SquidDev.
This commit is contained in:
		| @@ -233,7 +233,7 @@ function run() | ||||
|     			if type( tMessage ) == "table" and tMessage.nMessageID then | ||||
| 	    			if not tReceivedMessages[ tMessage.nMessageID ] then | ||||
| 		    			tReceivedMessages[ tMessage.nMessageID ] = true | ||||
|                         tReceivedMessageTimeouts[ os.startTimer( 30 ) ] = nMessageID | ||||
|                         tReceivedMessageTimeouts[ os.startTimer( 30 ) ] = tMessage.nMessageID | ||||
| 			    		os.queueEvent( "rednet_message", nReplyChannel, tMessage.message, tMessage.sProtocol ) | ||||
| 				    end | ||||
| 			    end | ||||
|   | ||||
| @@ -7,7 +7,7 @@ function slowWrite( sText, nRate ) | ||||
|     local nSleep = 1 / nRate | ||||
|          | ||||
|     sText = tostring( sText ) | ||||
|     local x,y = term.getCursorPos(x,y) | ||||
|     local x,y = term.getCursorPos() | ||||
|     local len = string.len( sText ) | ||||
|      | ||||
|     for n=1,len do | ||||
|   | ||||
| @@ -57,10 +57,6 @@ elseif sCommand == "host" then | ||||
|         x,y,z = gps.locate( 2, true ) | ||||
|         if x == nil then | ||||
|             print( "Run \"gps host <x> <y> <z>\" to set position manually" ) | ||||
|             if bCloseChannel then | ||||
|                 print( "Closing GPS channel" ) | ||||
|                 modem.close( gps.CHANNEL_GPS ) | ||||
|             end | ||||
|             return | ||||
|         end | ||||
|     end | ||||
|   | ||||
| @@ -310,14 +310,14 @@ elseif sCommand == "join" then | ||||
|     function printMessage( sMessage ) | ||||
|         term.redirect( historyWindow ) | ||||
|         print() | ||||
|         if string.match( sMessage, "^\*" ) then | ||||
|         if string.match( sMessage, "^%*" ) then | ||||
|             -- Information | ||||
|             term.setTextColour( highlightColour ) | ||||
|             write( sMessage ) | ||||
|             term.setTextColour( textColour ) | ||||
|         else | ||||
|             -- Chat | ||||
|             local sUsernameBit = string.match( sMessage, "^\<[^\>]*\>" ) | ||||
|             local sUsernameBit = string.match( sMessage, "^<[^>]*>" ) | ||||
|             if sUsernameBit then | ||||
|                 term.setTextColour( highlightColour ) | ||||
|                 write( sUsernameBit ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Wojbie
					Wojbie