Skip to content
Snippets Groups Projects
  1. Mar 11, 2023
  2. Feb 19, 2023
    • Rob Swindell's avatar
      The great 'long int' purge of 2023 part 1 · 59d8974c
      Rob Swindell authored
      At one time, Synchronet was a 16-bit DOS project, plagued by the 16-bit [u]int, so long's were used everywhere > 16-bits were known to be needed/wanted (This is before the days of the standard sized types from stdint.h), and they've persisted.
      
      But '[u]long int' is 64-bits on *nix 64-bit builds, 32-bits everywhere else (even 64-bit Windows builds if/when we ever get around to that), so this could lead to insidious bugs that would only show up on one flavor or the other. Since [u]int is 32-bits on everything we currently support, we'll use that instead of [u]long.
      
      This "part 1" because I'm sure there's going to be warnings and errors from the GCC/Clang builds as a result, which I'll get to next.
      59d8974c
  3. Oct 20, 2022
  4. Oct 18, 2022
    • Rob Swindell's avatar
      Full read/write support of new user.tab userbase file · 8a22b246
      Rob Swindell authored
      Also resolved some 32 vs 64-bit 'long' issues/ambiguities that have long-remained. :-)
      
      This commit also removes logon.lst file support.
      
      There's a TODO block remaining in js_user.c for setting portions of a user's birthdate (e.g. just the year or month or day).
      8a22b246
  5. Mar 24, 2022
    • Rob Swindell's avatar
      Support user credits and transfer stats > 4GB in total · 2d4ec7b8
      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
      2d4ec7b8
  6. Feb 22, 2022
    • Rob Swindell's avatar
      Timed event "month days" value of 1 means "any day" (same as 0) · cef184fc
      Rob Swindell authored
      This field should not normally have a value of '1' (no way to configure that, normally, since days are numbered starting at 1 and bit 1 is 2), but if it does, it's treated the same as 0 (any day of the month) - so fix that mismatch in getnexteventtime(). Just noticed this while comparing the logic with the new is_time_to_run() functions in main.cpp. That logic wasn't (should not have) changed, so this mismatch in the treatment of mdays == 1 existed before.
      cef184fc
  7. Nov 18, 2021
    • Rob Swindell's avatar
      Add text.dat lines for "All" and the List key ('L'), used in quoting · 9513bdba
      Rob Swindell authored
      The internal line editor's quoting feature add some hard-coded strings ("Done" and "All") and the (L)ist key was hard-coded. Use the text.dat string (new and pre-existing) for these now.
      
      Also, use the new sbbs_t *_key() methods for referencing the configured key bindings (via text.dat) for these common key-stroke commands.
      Convert the text.dat strings for keys (e.g. YNQP) to uppercase always as well.
      9513bdba
  8. Jun 07, 2021
    • Rob Swindell's avatar
      Modernize finduser() a bit · 32d45ed7
      Rob Swindell authored
      Skip any prepended white-space in the passed name to find.
      Use better variable names (and length) for the character strings.
      Use matchusername() instead of strcmp(); matchusername() follows the liberal user-id/alias/name matching algorithm.
      Use strcasestr() instead of strstr(), so no copy/modification (upper-casing) of passed name is now required.
      When 'Q'uitting the search, set the SS_ABORT flag.
      32d45ed7
  9. Apr 04, 2021
  10. Dec 29, 2020
  11. Dec 28, 2020
  12. Dec 21, 2020
    • Rob Swindell's avatar
      Fix next-forced-exclusive event time calculation · fda749ac
      Rob Swindell authored
      Jump the time forward (in 24-hour chunks) to find the next date/time the event will run rather than just adding 24-hours and assuming it's an event that runs every day (of the week or month) at a specific time.
      
      Also, expose the next-run-date/time for an event as a new `next_run` property for `xtrn_area.event[]` (in `time_t` format) for easier debugging of these kinds of issues.
      Also expose the error log level as a new property: `error_level` while we're here.
      fda749ac
  13. Dec 09, 2020
  14. Aug 16, 2020
  15. Apr 27, 2020
    • rswindell's avatar
      Paranoia checks in getnextevent(): · a477d854
      rswindell authored
      If either localtime_r() or mktime() return a error result, don't use use the
      non-sensical time.
      Nelgin has reported that under some conditions, he sees:
      Your time has been reduced due to an upcoming event on Wed Dec 31 1969 18:00:00
      when using Ctrl-T (time info hot key).
      I don't have an explanation for this, but if either of those function calls
      failed in getnextevent(), something like this could happen. <shrug>
      a477d854
  16. Jun 10, 2018
    • 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
  17. Oct 29, 2015
  18. Apr 28, 2015
    • rswindell's avatar
      Bug-fix: From the text.dat Yes/No/Quit/Password entry (YNQP), the 'Q' character · aa709e2a
      rswindell authored
      was never used. This was intended to be a method for internationalization,
      letting the sysop change which key is used as the uiniversal "quit" key.
      This commit replaces most of the uses of the hard-coded 'Q' for quit wtih the
      3rd charcter in the text.dat YNQP string. Some hard-coded menus still have the
      'Q' key hard-coded and will need to be addressed later. The text.h YN index
      macro was changed to YNQP and the JS text index variable name will change
      as well.
      aa709e2a
  19. Oct 19, 2011
  20. Mar 06, 2010
  21. Nov 09, 2009
  22. Mar 20, 2009
  23. Feb 16, 2009
  24. Aug 14, 2007
  25. Jul 25, 2007
  26. Jul 11, 2007
  27. Apr 05, 2006
  28. Apr 05, 2004
  29. Oct 24, 2003
  30. May 18, 2003
  31. Apr 18, 2003
  32. Apr 08, 2003
  33. Nov 13, 2002
  34. Mar 13, 2002
  35. Nov 27, 2001
Loading