1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-12 18:30:29 +00:00

Assorted fixes to rednet, textutils, gps, chat.

As reported by @SquidDev.
This commit is contained in:
Wojbie 2017-06-18 17:12:08 +02:00
parent 06b2f3511f
commit 7e08662b95
4 changed files with 4 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 )