Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

  1. 09 Apr, 2019 1 commit
  2. 26 Mar, 2019 1 commit
  3. 24 Mar, 2019 1 commit
    • rswindell's avatar
      New JS bbs methods: · b4d31140
      rswindell authored
      - bbs.show_msg()
      - bbs.show_msg_header()
      Re-worked the JS bbs.netmail() implementation
      sbbs::show_msg(), show_msghdr(), msgtotxt() now take an smb_t* argument
      (don't use the pseudo-global 'smb' in these functions any longer)
      sbbs_t::putmsg() and JS console.putmsg() now accept an optional orig_columns
      argument to specify the original column width of a text for intelligent
      re-word-wrapping (e.g. as taken from a message header field). Previously, the
      original-column value was hard-coded to 80 columns (technically, 79).
      sbbs_t::show_msghdr() no longer sends a CRLF if the cursor is already at the
      top-of-screen (TOS).
      sbbs_t::show_msg() now uses the stored "columns" msg header fields to pass to
      putmsg() to intelligently re-word-wrap message bodies for display.
      sbbs_t::show_msg() and msgtotxt() return bool now instead of void.
      JS MsgBase.get_all_msg_headers() now supports an optional "expand_fields"
      argument (defaults to true). I contemplated just getting rid of the (few)
      expanding header fields (more like default-value-header fields, like 'id'), but
      decided against it, at least for now.
      JS MsgBase.put_msg_header(), the "number_or_offset" argument is optional and
      not needed if a header object argument is provided. Make this clear in this JS
      docs for this method
      
      Note:
      I sat on this commit for a while because I noticed occasional errors like this:
          Node 1 <Digital Man> !ERROR 2 (No such file or directory) (WinError 0) in
          readmsgs.cpp line 217 (sbbs_t::loadposts) locking
          "path/to/sub" access=-100 info=smb_locksmbhdr msgbase not open
      started cropping up after introducing these changes and which I never
      root-caused. But after a clean-build and waiting a week, I haven't seen it
      again, so hopefully it was just a incomplete rebuild issue and not a new bug.
      b4d31140
  4. 22 Mar, 2019 1 commit
    • rswindell's avatar
      Use default calling convention (__cdecl) for DLL funcs in Borland builds. · bf82a889
      rswindell authored
      Fix age-old bug with Borland/C++Builder built executables (Windows):
      to achieve compatibility with  the default __cdecl symbol naming rules of
      Visual C++, we were using __stdcall convention for DLL functions when
      building code with Borland/C++Builder tools and using the default (__cdecl)
      convention when building with Microsoft (Visual C++) tools. Although this
      allowed symbols to be located when linking, the calling convention mismatch
      caused a stack cleanup issue that very rarely manifested itself in a bug
      (e.g. exception of some kind in sbbsctrl.exe, usually). Mismatching
      the calling conventions was unintentional (I thought the default for MSVC
      DLL functions was __stdcall) - but since the calls to MSVC-Built DLL functions
      worked 99% of the time, I didn't realize there was an underlying issue. So I
      now work-around the DLL symbol naming mismatch using a command-line option (-a)
      passed to implib in src/sbbs3/ctrl/makelibs.bat
      
      I had previously worked-around exceptions when calling MSVC DLL functions in
      sbbsctrl.exe by calling the problematic DLL functions from a timer tick handler
      rather than a user control (e.g. button) event handler. Those work-arounds can
      now be removed.
      
      The erroneous "DLLCALL" definition design pattern was replicated (copy/pasted)
      to many other projects' header files in cvs.synchro.net. In the future, we may
      want to just remove all instances of *CALL since they now serve no purpose and
      appear as useless "Kruft" (but do allow us to more-easily globally change DLL
      function calling conventions if/when necessary in the future).
      bf82a889
  5. 20 Feb, 2019 1 commit
    • rswindell's avatar
      Reversed course on the WM_QUOTE mode handling in sbbs_t::postmsg() · 57424543
      rswindell authored
      (JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto-
      create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling
      sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE)
      with a custom-created quote file (e.g. with msg tails), that'll still work as
      before (e.g. DDMsgReader.js).
      
      bbs.email() and bbs.netmail() now support an optional reply_header_object
      argument which works like bbs.post_msg(). These methods (and the underlying
      C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the
      quote file now, when the WM_QUOTE mode flag is *not* set.
      
      The auto-created quotes.txt now includes the plain-text version of MIME-encoded
      messages.
      
      the bbs.post_msg(), email(), and netmail() methods now all support reply
      header objects that came directly from bbs.get_msg_header() *or* copies of
      such header objects (but the auto-quoting feature won't work when supplied
      this type of header object). So if passed a header object returned from
      bbs.get_msg_header(), we can now use the message base (for auto-quoting) and
      the underlying msg storage directly (no JS parsing necessary). This is what
      the new js_GetMsgHeaderObjectPrivates() function is used for.
      
      js_ParseMsgHeaderObject() (and the underlying parse_header_object() function)
      now supports either an actual internally-generated msg header object (e.g.
      returned from bbs.get_msg_header()) or one that is a copy or hand-constructed.
      
      quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't
      have to since we can now get to underlying msg storage in the js_msgbase.c
      via js_GetMsgHeaderObjectPrivates().
      
      quotemsg() now reads only the plain-text portion of MIME-encoded messages.
      
      As part of this effort, I modernized the method prototypes using default
      argument values (e.g. WM_NONE for wm_mode arguments) and removed some
      extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are
      automatically added by the sbbs_t::email() and *netmail() functions).
      
      savemsg() now *does* support reply-IDs/thread-linkage via the additional
      'remsg' argument (when non-NULL).
      
      Replaced some use of nulstr with NULL.
      
      Replaced more boilerplate SMB open code with calls to smb_open_sub().
      57424543
  6. 19 Feb, 2019 1 commit
    • rswindell's avatar
      sbbs_t::postmsg() and JS's bbs.post_msg() changes: · d95d30ea
      rswindell authored
      When the WM_QUOTE mode flag is set and the 'remsg' is specified, the original
      message will quoted (excluding message tails, using the proper word-wrapping).
      If the quote file already exists before calling postmsg()/bbs.post_msg(), it
      will be over-written. This allows JS script to initiate reply-posts with quoted
      text without having to create their own quotes file. It also means there's no
      need to call sbbs_t::quotemsg() before calling sbbs_t::postmsg().
      sbbs_t::quotemsg() now takes an smb_t* arg (stop using the sbbs_t 'global'
      smb) and now returns bool.
      d95d30ea
  7. 17 Feb, 2019 1 commit
    • rswindell's avatar
      QWK-reply-posted email/netmail messages did not contain a Message-ID. Really? · 7446c395
      rswindell authored
      So I created a single add_msg_ids() function (mostly migrated from postmsg.cpp)
      to make this incredibly easy so any/everywhere that adds a message to a message
      base should be able to call it. This function also creates reply-IDs (when
      relevant) and program ID (Fido-PID) header fields:
      - FIDOPID (always)
      - FIDOMSGID (if an echomail post)
      - FIDOREPLYID (if an echomail reply-post)
      - RFC822MSGID (always)
      - RFC822REPLYID (if a reply)
      7446c395
  8. 08 Feb, 2019 1 commit
    • rswindell's avatar
      Add/use new function findstr_list() which opens and returns a string list · 32051b32
      rswindell authored
      suitable for passing to findstr_in_list().
      SBBSecho peformance improvement: don't open/read the twitlist.cfg file for
      *each* imported message: just read it once during initialization (using the new
      findstr_list() function of course).
      Reversed course on the findstr()/trashcan() matching logic: significant leading
      white-space was not backwards compatible (and was the cause of recent lost
      messages in DOVE-Net) - so I decided to go a different route and support
      C-style character escape sequences (e.g. \r, \n, \t, \x##, etc.) in findstr
      comparison strings, so the new way to represent a leading space character
      in a filter file (e.g. twitlist.cfg, name.can) would be: "\ ". So to match (e.g.
      filter/disallow) all strings with a leading space: "\ *". "\x20 *" would also
      work (0x20 is ASCII for "space").
      Now, again, leading white-space in filter files (e.g. text/*.can, twitlist.cfg)
      is ignored. <sigh>
      32051b32
  9. 03 Feb, 2019 1 commit
  10. 20 Jan, 2019 1 commit
    • rswindell's avatar
      The "stdio" File objects (stdin, stdout, stderr) did not work on Windows, · 7acadb70
      rswindell authored
      because the stdout FILE* is a different address in jsexec than it is in sbbs.dll
      (where the actual File I/O operations occurred). Refactored by passing the
      stdio file descriptor (and open mode) to js_CreateFileObject rather than the
      FILE* and using fdopen() to get a FILE* associated with the descriptor.
      stdout.write() now works, for example.
      7acadb70
  11. 07 Jan, 2019 1 commit
    • sbbs's avatar
      Fix various JSDOCS_BUILD with gcc warnings. · 0d7eb6ee
      sbbs authored
      warning: ISO C++ forbids converting a string constant to 'char*'
      and comparision between signed/unsigned int.
      This does *not* address the reported build issue:
      In function `_start':
      (.text+0x20): undefined reference to `main'
      0d7eb6ee
  12. 30 Dec, 2018 1 commit
  13. 04 Nov, 2018 1 commit
  14. 03 Nov, 2018 1 commit
    • deuce's avatar
      Fix new error with Clang 6.x: · cb1d932f
      deuce authored
      exec.cpp:438:8: error: case value evaluates to 2684500526, which cannot be narrowed to type 'int32_t' (aka 'int')
            [-Wc++11-narrowing]
                      case 0xA0023A2E:
                           ^
      
      The switch cases were unsigned, but the passed value was an int32.
      cb1d932f
  15. 30 Oct, 2018 1 commit
    • rswindell's avatar
      External programs that are "binary" in nature (e.g. file transfer protocols) · be7d06bc
      rswindell authored
      now have their output translated to PETSCII equivalents for PETSCII terminals
      (but input is not yet translated).
      .seq files are now sent untranslated via printfile() and putmsg() to PETSCII
      terminals (using the new P_PETSCII putmsg mode flag).
      .seq files (and P_PETSCII mode text printed via putmsg) is now converted
      (poorly) from PETSCII to CP437 - this is still a work-in-progress.
      Remove the remants of WIP and HTMLterm support from putmsg() and printfile().
      be7d06bc
  16. 26 Oct, 2018 1 commit
  17. 25 Oct, 2018 2 commits
    • rswindell's avatar
      Introduce a new printfile/tail/menu mode flag: P_NOERROR, which if used, · 1fee774d
      rswindell authored
      means no error message will be displayed/logged if the referenced file does
      not exist.
      1fee774d
    • rswindell's avatar
      Update display/menu file selection logic based current terminal capabilities. · 68e52292
      rswindell authored
      Newly supported files: text/menu/*.msg (higher priority than .asc when the
      terminal supports IBM extened ASCII, aka CP437). These are the same format
      as .asc files (and supported more readily by PabloDraw).
      Newly supported files: text/menu/*.seq - native PETSCII files for PETSCII
      terminals only. Support in the underlying putmsg() function is still
      pending.
      Also, the text/*.msg files now supports alternative file formats for
      RIP/ANSI/PETSCII, if the files exist.
      WIP menu support removal.
      The new menu/display file selection priority will be detailed on
      wiki.synchro.net, but rest assured, it's backwards compatible with
      the previous/old priority with the exception of the removal of WIP support
      and HTML support.
      68e52292
  18. 22 Oct, 2018 1 commit
    • rswindell's avatar
      The big PETSCII commit: · 31303187
      rswindell authored
      So Omegix recently asked in the Synchronet Discussion group whether or not
      a PETSCII (Commodore) terminal could be used to access his Synchronet BBS.
      Now, the answer is "Yes". :-)
      The major issues addressed:
      
      - detecting a PETSCII terminal, solved by assigning specific (configurable):
        TCP ports to be used for incoming PETSCII connections, by default:
        port 64 is for 40-column PETSCII and port 128 is for 80-column PETSCII,
        but if the terminal sends a Telnet Window Size reply (e.g. SyncTERM), then
        either size terminal should fine on either port.
        The port numbers are configurable in the [BBS] section of your sbbs.ini
        file using the new keys: PET40Port (default value: 64) and PET80Port
        (default value: 128). Having these keys set doesn't make make the terminal
        server listen on that additional port - you'll need to add more
        IP:port combinations to one of Interfaces values, example:
          TelnetInterface=71.95.196.34,71.95.196.34:64,71.95.196.34:128
        And you don't have to use Telnet for the PETSCII connections - you could use
        RLogin or SSH instead (or in addition).
      
      - support for terminal widths < 80 columns:
        This was achieved through a combination of text.dat changes (numerous),
        new Ctrl-A and @-codes and new optional terminal-width-specific menu files
        (e.g. text/menu/main.40col.asc)
        A side effect of these changes is actually better support for terminals
        *wider* than 80 columns as well!
      
      - support for terminals that don't expand tabs to spaces (e.g. PETSCII):
        The terminal server now handles tab expansion with a run-time settable
        tab-size (default size: 8)
      
      - conditional access based on PETSCII (or small) terminal use (or not):
        + New PETSCII ARS keyword (boolean)
        + New COLS and ROWS ARS keywords (for terminal width and height requirements)
        + New TERM (string) ARS keyword
      
      New @-codes:
        - WORDWRAP, when placed at the top of a file, enables auto-wordwrap for
                    lines longer than the terminal width
        - CENTER, the text following before an end of line will be displayed centered
                  on the terminal (whatever the width, in columns)
        - CLEAR, like CLS, except it ignores (doesn't display) a CRLF that follows
        - COLS, current number of terminal columns (width)
        - ROWS, current number of terminal rows (height)
        - TERM, the auto-detected or reported terminal type (e.g. ANSI, TTY, etc.)
        - SYSONLY, toggles "echo" (display) off/back-on for non-sysops
                  similar to the Ctrl-A( and ) codes, but more convenient to use
                  (and PabloDraw won't strip the @-code from the file like it does
                   with Ctrl-A codes it doesn't support)
      
      New Ctrl-A codes:
        - \ conditional new-line/continuation when the terminal width is < 80 cols
            prints the new text.dat string LongLineContinuationPrefix
      
      yesno() will now return true if passed a blank string.
      noyes() will now return false if passed a blank string.
      getstr()'s input length limiting based on terminal width is more broadly
                 applied now (not just when using the K_LINE mode flag).
      
      New JS bbs object method: menu_exists(<base_filename>) returns Boolean
      New JS console object property: tabstop (Number)
      New JS console object methods: getbyte() and putbyte() to recv/send raw byte
          value with (very little) interpretation/intervention by the terminal server
      New JS console object method: creturn() - performs a carriage return
          (or equivalent)
      New JS (and C) printfile() mode flag: P_TRUNCATE, causes long lines to be
          truncated, rather than displaying causing a line-wrap.
      
      New text.dat strings:
        - NoAccessTerminal (for ARS check failures)
        - LongLineContinuationPrefix (for breaking long lines for 40col terminals)
        - Scanning (replaces a previously hard-coded "Scanning" string)
        - Done (replaces a previusly hard-coded "Done")
        - Scanned  (when finished scannning, clears the progress bar)
      31303187
  19. 09 Oct, 2018 2 commits
  20. 06 Sep, 2018 1 commit
  21. 03 Aug, 2018 1 commit
  22. 29 Jul, 2018 1 commit
  23. 25 Jul, 2018 3 commits
  24. 24 Jul, 2018 1 commit
    • rswindell's avatar
      Singificantlly improve message scan pointer initialization (e.g. for new · 264cb38c
      rswindell authored
      users) and adjusting scan ptrs by date or set to "Last msg" while online:
      - speed (on my system, reduced from 12 to < 2 seconds)
        This involved 2 enhancements: check msgbase index file timestamp (fast)
        before opening any files. When opening the msgbase, just open the index
        file (no other msgbase files) - required new smblib function: smb_open_index.
      - fixed off-by-one when setting by date (when setting the new-scan ptr to
        Jan-1-2018, you want that first message posted on/after Jan-1-2018 to be
        found as "new", not the first message posted *after* that date.
      - re-added the fixmsgptrs() call in putmsgptrs(), inadvertently removed
        in the .ixb -> .ini ptr storage update in rev 1.192 of userdat.c.
      264cb38c
  25. 10 Jun, 2018 1 commit
    • rswindell's avatar
      JS bbs object changes: · a32a52cb
      rswindell authored
      - finduser() method no longer prints "Unknown user" upon failure (the calling
        script can do this if/when it wants).
      - read_mail() method now accepts an optional 3rd argumnet (loadmail_mode)
        which may be used to load *only* un-read mail (for example), see LM_* in
        sbbsdefs.js
      
      Pass the lm_mode as a 4th argument to any readmail mod (if one is installed) -
      this correlates with the LM_* mode flag values (0 is normal/usual).
      
      File attachments can also be in a file/####.out directory (e.g. outbound
      Internet email attachments), so try deleting from there too when deleting
      mail with attachments.
      a32a52cb
  26. 06 Apr, 2018 2 commits
  27. 04 Apr, 2018 1 commit
    • rswindell's avatar
      sbbs_t::badlogin() now accepts 3 more (optional) arguments which allow us · 361fd9ff
      rswindell authored
      to use this function in bbs_thread() for SSH failed login attempts and thus
      enable the perm-IP-filtering (LoginAttemptFilterThreshold) functionality.
      Right now, it's only a "bad login" if the "Getting channel type" doesn't
      return "session", but we could (and likely will) use it for more SSH login
      failure modes which indicate a likely hack-attempt.
      361fd9ff
  28. 25 Mar, 2018 1 commit
    • rswindell's avatar
      Attempt to address multiple redundant SSH related error/log messages from · 2f8c56f7
      rswindell authored
      the output_thread which may occur after an SSH-related error in the input
      thread, e.g.:
      Sun Mar 25 2018 01:45 pm bbs.synchro.net
      Node 6 SSH ERROR 'Bad argument, parameter 2' (-2) setting channel
      
      Sun Mar 25 2018 01:45 pm bbs.synchro.net
      Node 6 SSH ERROR 'Bad argument, parameter 2' (-2) setting channel
      
      Sun Mar 25 2018 01:45 pm bbs.synchro.net
      Node 6 SSH ERROR 'Bad argument, parameter 2' (-2) setting channel
      
      Sun Mar 25 2018 01:45 pm bbs.synchro.net
      Node 6 SSH ERROR 'Bad argument, parameter 2' (-2) setting channel
      
      Sun Mar 25 2018 01:45 pm bbs.synchro.net
      Node 6 SSH ERROR 'Bad argument, parameter 2' (-2) setting channel
      
      Sun Mar 25 2018 01:45 pm bbs.synchro.net
      Node 6 SSH ERROR 'Bad argument, parameter 2' (-2) setting channel
      
      ... by introducing a new sbbs_t member variable: terminate_output_thread
      which is only set to true when the input_thread is terminating.
      
      If there is any possibility that the input_thread could startup and get
      an SSH error before the output_thread even starts, then we will want to
      move the terminate_output_thread=false initialization to the sbbs_t
      constructor.
      2f8c56f7
  29. 12 Mar, 2018 1 commit
  30. 11 Mar, 2018 1 commit
  31. 10 Mar, 2018 1 commit
  32. 25 Feb, 2018 1 commit
  33. 23 Feb, 2018 2 commits
    • deuce's avatar
      Add certificate handling via the CryptCert class. · 01904b00
      deuce authored
      Also add add_public_key() and get_public_key() methods to CryptKeyset.
      Not tested yet, but this should be everything we need to finish up
      LetSyncrypt.
      01904b00
    • deuce's avatar
      Add CryptKeyset class. · bfcdc66a
      deuce authored
      This class allows saving and loading private keys.  It doesn't currently
      allow saving or loading *public* keys, since they require certificate support
      which we don't yet have in our JavaScript Object Model.
      
      I'll fix the JSDocs build in a minute.
      bfcdc66a
  34. 20 Feb, 2018 1 commit