10 Commits
Author SHA1 Message Date
tema5002 a5de781471 refactor: move source files to src/ directory 2026-09-19 12:30:33 +03:00
tema5002 d2ad6be236 Add telnet (kinda) 2026-08-08 20:16:59 +03:00
tema5002 ca65d252c9 acidentally messed up mcplayers changes :( also fuck you your code sucks ok sorry that was probably rude but still go fu 2026-07-19 11:47:30 +03:00
mcplayer3 fc184ea591 Started to add custom colour palettes
I have literally no idea why it wont work but if anyone picks this up you'll know it works when the old Halyde colours show up
2026-07-19 11:47:23 +03:00
tema5002 8a76ca11c9 The last cutting-edge commit out of the lot making the terminal a lot nicer 2026-07-19 11:45:07 +03:00
tema5002 8a3a34efc0 Update halyde/kernel/modules/terminal.lua 2026-07-19 11:44:05 +03:00
tema5002 996d81129d I am a moron 2026-07-19 11:44:02 +03:00
tema5002 499dfd6843 Amiga Going Ball demo recreation 2026-07-19 11:43:58 +03:00
mcplayer3 8aa08814a1 Apparently I left in some unused variables that were supposed to be removed by Tema 2026-06-20 15:40:58 +03:00
mcplayer3 eaae852961 Started to add custom colour palettes
I have literally no idea why it wont work but if anyone picks this up you'll know it works when the old Halyde colours show up
2026-06-20 15:40:51 +03:00
105 changed files with 62 additions and 2 deletions
View File
+60
View File
@@ -0,0 +1,60 @@
-- Despite the name it's not telnet
local component = require("component")
if not component.isAvailable("internet") then
terminal.write("telnet: this program requires an internet card to run\n")
return
end
local internet = component.internet
if not internet.isTcpEnabled() then
terminal.write("telnet: TCP disabled\n")
return
end
local arg = {...}
local host = arg[1]
local port = tonumber(arg[2])
local sock = internet.connect(host, port)
local connected = false
local err
for _ = 1, 5 do
local ok
ok, err = sock.finishConnect()
if ok then
connected = true
break
end
coroutine.yield()
end
if not connected then
print("telnet: " .. err)
return
end
print(("connected to %s:%d"):format(host, port))
while true do
local fromSocket = sock.read(math.maxinteger or math.huge)
if fromSocket == nil then
print("telnet: connection closed")
sock.close()
return
end
terminal.write(fromSocket)
terminal.flush()
local fromTerminal = terminal.read()
if fromTerminal == "" then
sock.close()
return
end
while fromTerminal ~= "" do
local nbytes, err = sock.write(fromTerminal .. "\r\n")
if err then
print("telnet: " .. err)
return
end
fromTerminal = fromTerminal:sub(nbytes + 1)
end
end
@@ -592,7 +592,7 @@ function module.init()
local args = { ... }
local stringArgs = {}
for _, arg in pairs(args) do
if type(arg) == "table" then
if type(arg)=="table" then
table.insert(stringArgs, serialize(arg))
elseif tostring(arg) then
table.insert(stringArgs, tostring(arg))
View File
View File
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More