MultiMail is reading our QWK files!
authorplugd <plugd@thelambdalab.xyz>
Mon, 5 Aug 2024 12:50:33 +0000 (14:50 +0200)
committerplugd <plugd@thelambdalab.xyz>
Mon, 5 Aug 2024 12:50:33 +0000 (14:50 +0200)
obbs

diff --git a/obbs b/obbs
index 2a82da8..21d1982 100755 (executable)
--- a/obbs
+++ b/obbs
@@ -37,7 +37,7 @@ local function print_table (t, lev)
 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 = {}
@@ -99,7 +99,7 @@ function qwk.write_control(target_dir, obbs, user_name)
    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")
@@ -165,7 +165,7 @@ function qwk.write_message_header_block(mf, obbs, conf_num, pkt_msg_num, msg)
 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))