end
local function space_pad(s, n)
- return string.rep(" ", math.max(0,n-string.len(s))) .. string.sub(s,1,n)
+ return string.sub(s,1,n) .. string.rep(" ", math.max(0,n-string.len(s)))
end
local fs = {}
cf:write("\r\n") -- BBS location
cf:write("\r\n") -- BBS phone number
cf:write(obbs.sysop .. "\r\n")
- cf:write("," .. obbs.bbsid .. "\r\n")
+ cf:write("12345," .. obbs.bbsid .. "\r\n")
cf:write(os.date("%d-%m-%Y,%X") .. "\r\n") -- packet creation time
cf:write(user_name .. "\r\n")
cf:write("\r\n")
end
function qwk.write_message_blocks(mf, obbs, msg)
- mf:write(string.gsub(msg.text, "\n", "\xe3"))
+ mf:write((string.gsub(msg.text, "\n", "\xe3")))
local padding = (128 - (string.len(msg.text) % 128)) % 128
mf:write(string.rep("\0",padding))