1. 25 Apr, 2022 2 commits
  2. 22 Apr, 2022 1 commit
    • Rob Swindell's avatar
      Limit door.sys numeric values to 32767 · 6b36b379
      Rob Swindell authored
      The DoorFrame door library will about with "Overflow Error" if it reads a door.sys file with lines 16 (calls), 42 (minute credits), or 52 (posted messages) with a value > 32767, the maximum positive value of a signed 16-bit integer. So cap these values in the door.sys file at that maximum. This does potentially break/limit doors that give minutes using the door.sys drop file, so use that "modify user data" option in SCFG with care.
      
      Electrosys initially reported this problem with the Lemonade! door game which was barfing on a line 42 value of 449632.
      6b36b379
  3. 14 Apr, 2022 1 commit
    • Rob Swindell's avatar
      Add configurable log size limit and retention count · 238b0b7c
      Rob Swindell authored
      For the following log files:
        hungup.log
        error.log
        crash.log
        hack.log
        spam.log
        guru.log
      
      ... they can be limited in size, in bytes, by the sysop, along with a maximum retention limit (number of *.#.log files). Configured in SCFG->System->Advanced.
      
      By default, the limit and keep numbers are 0, so "unlimited" (same behavior as before). Once sufficiently tested, I'll change the default in a stock main.cnf file to use a sensible limit (e.g. 10 log files of 10MB each, something like that).
      238b0b7c
  4. 30 Mar, 2022 1 commit
  5. 29 Mar, 2022 1 commit
  6. 24 Mar, 2022 2 commits
    • Rob Swindell's avatar
      Fix newly-introduced GCC warnings · 9405250f
      Rob Swindell authored
      9405250f
    • Rob Swindell's avatar
      Support user credits and transfer stats > 4GB in total · 1cac2c8a
      Rob Swindell authored
      Credits and daily free credits are accurate to the byte up to (a maximum) of 18446744073709551615 (that's 18 Exbibytes - 1).
      
      User's upload and download byte stats are now similarly extended in maximum range, but the accuracy is only "to the byte" for values less than 10,000,000,000. Beyond that value, the accuracy declines, but is generally pretty damn accurate (to 4 decimal places beyond the nearest multiple of a power of 1024), so I don't expect that to be an issue. This method of storing upload/download byte stats allowed me to use the same 10-character user record fields in the user.dat file.
      
      As a side-effect of this enhancements:
      * User and file credit values are now expressed in multiples of powers of 1024 (e.g. 4.0G rather than 4,294,967,296).
      * Free credits per day per security level has now been extended from 32 to 64-bits (to accommodate values >= 4GB).
      * adjustuserrec() now longer takes the record length since we can easily determine that automatically and don't need more "sources of truth" that can be out-of-sync (e.g. the U_CDT field length going from 10 to 20 chars with this change).
      * setting the stage for locale-dependent thousands-separators (e.g. space instead of comma) - currently still hard-coded to comma
      * more/better support for files > 4GB in size (e.g. in the batch download queue)
      * user_t ulong fields changed to either uint32_t or uint64_t - I didn't realize how many long/ulong's remained in the code (which are sometmies 32-bit, sometimes 64-bit) - ugh
      * Steve's ultoac() function renamed to u32toac() and created a C++ wrapper that still uses the old name, for homage
      1cac2c8a
  7. 13 Mar, 2022 2 commits
  8. 12 Mar, 2022 1 commit
  9. 10 Mar, 2022 2 commits
  10. 09 Mar, 2022 1 commit
    • Rob Swindell's avatar
      Fix EXITINFO.BBS generation for 64-bit time_t and more · 6ddae40a
      Rob Swindell authored
      So I was working on re-writing some of this door file generation code and noticed that the EXITINFO.BBS files generated by SBBS:
      
      1. had a lot of garbage data filling unused string characters (no "harm", but potentially leaking information)
      2. had the wrong total file length due to 64-bit logontime (time_t)
      3. had the wrong total file length due to writing 19 GosubData elements (instead of 20)
      
      The first and last issues appear to be some of those "forever" (20+ year old) bugs.
      
      So I'm guessing no regularly used door games actually use these portions of the EXITINFO.BBS, so most likely: no harm, no foul. But still, best to fix this before I commit the rewrite.
      6ddae40a
  11. 05 Mar, 2022 1 commit
    • Rob Swindell's avatar
      Don't use pointers to the low byte of multi-byte integers · 959fa9fe
      Rob Swindell authored
      This only works on little endian systems (which is all we support currently).
      
      Fixes CID 174261: Wrong size argument
      
      This binary drop file writing code is pretty terrible and inefficient, but I remember being really proud of it (supporting so many drop files). This really should be re-written to use structures and/or buffered file I/O.
      959fa9fe
  12. 24 Feb, 2022 1 commit
  13. 01 Dec, 2021 1 commit
    • Rob Swindell's avatar
      Remove the last remnants of Win9x/Me support · 717592bc
      Rob Swindell authored
      Allow "FOSSIL Only" as a configuration option for external programs in SCFG. This is a much easier method of disabling the virtual UART support in the Virtual UART/FOSSIL device driver (if/when necessary) than editing the sbbsexec.ini file (which is still supported).
      717592bc
  14. 24 Nov, 2021 1 commit
  15. 18 Apr, 2021 1 commit
    • Rob Swindell's avatar
      Update sound (WAV) file play-on-event support in Windows build · f26a82b0
      Rob Swindell authored
      A "hack attempt" sound file is now supported in the Terminal Server, Mail Server,  and Services.
      
      "login" and "logoff" sound files are now supported in the Terminal Server, FTP Server, Web Server, Mail Server, and Services.
      This enhancement fixes Issue #157
      
      The following sound files may now be configured in the [Global] section of the ctrl/sbbs.ini file, if desired to set the default sound files for all servers/services in on place:
      - AnswerSound
      - LoginSound
      - LogoutSound
      - HangupSound
      - HackAttemptSound
      f26a82b0
  16. 04 Apr, 2021 1 commit
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · fcf58640
      Rob Swindell authored
      This won't impact Synchronet as it has a separate signal handling
      thread, but we still need to behave properly for processes that
      don't.  I'm also saying that ENOMEM does not indicate a disconnection,
      though it may be better to pretend it was disconnected...
      fcf58640
  17. 15 Feb, 2021 2 commits
  18. 17 Dec, 2020 1 commit
    • Michael Long's avatar
      Improvements to linux dosemu support · 0bf85543
      Michael Long authored
      The hardcoded external.bat file has been moved to a templated
      /exec/external.bat which can be modified by the sysop. ENV
      vars are in there to be able to customize as needed. emusetup.bat
      is no longer needed, but still supported. The actual dosemu command line
      is now stored in /exec/dosemulaunch.ini and can be customized for
      fossil or i/o command lines. the keystroke is now only sent for i/o, and
      only sent as \n instead of \r which would trigger undesired behavior in
      certain programs. The above 2 files can also be placed in door dirs
      to override. ansi.com has been removed as it was not needed. default
      external.bat includes cmd lines for share, x00, etc. (user will still
      need to provide these in xtrn/dosutils).
      0bf85543
  19. 12 Dec, 2020 1 commit
  20. 11 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Use term_supports() rather than useron.misc for drop file terminal caps · 938c4ee1
      Rob Swindell authored
      Always use the return value of term_supports(), which correctly supports pre-logon and auto-terminal-capability-detection, rather than useron.misc for all door drop file generation.
      
      This should resolve the issue recently discussed in #synchronet with regards to a user getting non-ANSI output from door games even when using an ANSI-capable terminal.
      938c4ee1
  21. 29 Nov, 2020 1 commit
  22. 25 Nov, 2020 4 commits
  23. 18 Nov, 2020 1 commit
  24. 11 Nov, 2020 1 commit
  25. 06 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · 8a7b7308
      Rob Swindell authored
      I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values.
      
      This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service).
      
      The new macros names are bit more descriptive as well.
      8a7b7308
  26. 04 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Move the external program "pause on exit" implementation back to the C++ code. · 255ffd7a
      Rob Swindell authored
      Originally, the "pause on exit" was implemented in the C++ version of
      sbbs_t::xtrn_sec() and not sbbs_t::exec_xtrn(). This meant that the pause
      option was only implemented when the prgoram was invoked from the menu and
      not when invoked directly (e.g. via Baja or JS exec_xtrn function).
      
      When sbbs_t::xtrn_sec() was ported to JS, that functionality was also moved
      to JS. But it really should have been implemented in exec_xtrn() to begin
      with so that regardless of how the program is invoked, that SCFG setting takes
      effect.
      
      Thanks to Michael Long for pointing this out.
      255ffd7a
  27. 04 Oct, 2020 1 commit
    • Rob Swindell's avatar
      New functions to return a user's birthdate in multiple formats · 22e529cd
      Rob Swindell authored
      e.g. MM/DD/YY for drop files that assume that format, or either MM/DD/YY or
      DD/MM/YY (depending on sysop preference) for backwards compatibility in
      expanded @-codes, Guru chat keyword.
      
      Fixed the birthdate check while logging on to work with new/all birthdate
      formats.
      22e529cd
  28. 03 Oct, 2020 1 commit
  29. 02 Oct, 2020 1 commit
    • Rob Swindell's avatar
      Add option to create drop files in node's temp directory. · 2014777c
      Rob Swindell authored
      Enabling this feature causes the node's temp directory to be cleared before
      running the external program and causes the drop file(s) to be created-in and
      read back from (when appropriate) the node's temp directory.
      
      Creating drop files in a node's temp directory eliminates the possiblity of
      an external program (e.g. door game) accidentally reading the wrong drop
      file (e.g. wrong-cased name or a stale file of a different type).
      
      Note: Synchronet/XSDK doors *always* read their drop file (xtrn.dat) from the
      node directory, so don't try to use this option with those doors. Only doors
      where you can configure the drop file path or specify on the command-line
      (e.g. %g for the temp dir or %f for the fullpath of the drop file) should
      potentially use this new feature.
      2014777c
  30. 19 Sep, 2020 1 commit
  31. 30 Aug, 2020 1 commit
    • Rob Swindell's avatar
      External program "use shell" option can be used to use a new JS context · 1decdc69
      Rob Swindell authored
      Rather than introduce yet-another-external-program/config flag to enable
      the "new JS run-time/context" per invocation of any particular JS command,
      I'm using the XTRN/EX_SH ("Use Shell") option as it had no function for
      JavaScript command-lines and the concept is similar.
      
      So if you want to invoke a JS external program/timed-event in its own
      "sandbox", enable the "Use Shell / New Context" option for that
      program/command in SCFG. There may be performance penalties when running
      JS mods in this way, but you get the benefit of isolating one JS module
      from all others, if/when necessary.
      1decdc69
  32. 16 Aug, 2020 1 commit