Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- multishell.setTitle(multishell.getCurrent(), "out")
- local m = peripheral.find("modem")
- local senderID = os.getComputerLabel() == nil and "ID:" .. os.getComputerID() or os.getComputerLabel()
- local channels = {
- ["stdout"] = 1000,
- ["stdin"] = 1001,
- ["witherout"] = 1010,
- ["witherin"] = 1011
- }
- m.open(channels.stdout)
- while true do
- evt, face, sendCh, replyCh, msg, dist = os.pullEvent("modem_message")
- local textLen = #msg.text
- for i = 1, textLen do
- print("[" .. msg.sender .. ":" .. msg.type .. "] " .. msg.text[i])
- end
- end
Add Comment
Please, Sign In to add comment