Skip to content
Snippets Groups Projects
  1. Feb 09, 2023
    • Rob Swindell's avatar
      Allow system.matchuserdata() to search deleted user records · e61eb77b
      Rob Swindell authored
      Insert an optional boolean argument to enable a search through deleted and
      inactive user records (in addition to active user records). This is part of
      the solution to the problem described in issue #513 where the UEDIT sysop
      command did not go to a specified user (by alias) automatically, presumably
      because the user record was marked as deleted.
      e61eb77b
  2. Dec 30, 2022
    • Rob Swindell's avatar
      Resolve unused variable warning introduced in previous commit · 692f95e4
      Rob Swindell authored
      Some trailing whitespace clean-up too.
      692f95e4
    • Rob Swindell's avatar
      Add JS system.find_login_id() method · d37d1380
      Rob Swindell authored
      d37d1380
    • Rob Swindell's avatar
      Common login control (e.g. via real name) using new find_login_id() function · 7679dcf8
      Rob Swindell authored
      Previously, many servers and services didn't support login by real name
      (e.g. issue #469) even if the sysop had that option enabled in SCFG.
      
      Move login control settings from node.ini to system (main.ini -> login)
      
      The 3 node toggle options:
      - Allow Login by User Number
      - Allow Login by Real Name
      - Always Prompt for Password
      
      ... have been now moved from SCFG->Nodes->Node x->Toggle Options to
      SCFG-System->Toggle Options.
      
      If you upgraded to v3.20a before now, you'll want to double-check these
      settings to make sure they're how you want them set. New upgraders that run
      upgrade_to_v320.js (e.g. via 'jsexec update') will get these settings migrated
      automatically.
      
      Added some error detection/logging to upgrade_to_v320.js when failing to open
      .cnf files.
      
      Constified some more user/login related function args and return types.
      7679dcf8
  3. Dec 23, 2022
  4. Nov 12, 2022
  5. Oct 29, 2022
  6. 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
  7. Mar 28, 2022
    • Rob Swindell's avatar
      Overhaul statistics files · f963dcbf
      Rob Swindell authored
      */dsts.dab (daily statistics and running totals) -> */dsts.ini
      */csts.dab (cumulative statistics / log) -> */csts.tab
      
      * dsts.ini now has both daily and total stats for all fields (not just timeon and logons).
      * dsts.ini is now an easily modifiable text file - no longer need dstsedit (here-by deprecated and soon to be deleted)
      * dsts.ini and csts.tab support 64-bit upload/download byte stats and are very extensible for future fields to be added or extended > 32-bit (this was the main inspiration for this overhaul, but it was overdue and already designed for v4, pretty much)
      * csts.tab is a tab-delimited fixed length record format suitable for easy import to a spreadsheet program or parsing with scripts. Each day is a 128-character LF-delimited record with tab-delimited fields of plain ASCII text.
      * All fields except timeon in dsts.ini files are updated immediately and by more non-terminal servers (e.g. post statistics from web UI scripts).
      * New user stats are tracked more than just for "today".
      
      The upgrade of these files is automatic and built-into SBBS.
      
      Still to do: overhaul the slog utility to support the new csts.tab file format.
      f963dcbf
  8. Mar 20, 2022
  9. Feb 12, 2022
  10. Jan 20, 2022
  11. Jan 05, 2022
  12. Jan 02, 2022
  13. Aug 09, 2021
  14. Apr 20, 2021
  15. Apr 06, 2021
    • Deucе's avatar
      Fix msclock() and xp_timer() to be monotonic on *nix · 411e50a2
      Deucе authored
      Previously, these both used gettimeofday() which is both expensive
      to call, and not monotonic.
      
      This fixes system.clock_ticks in JS and various internal bits. for
      when the UTC wall clock jumps.
      
      While we're here, fix the documention of system.clock_ticks
      411e50a2
  16. Apr 04, 2021
  17. Apr 02, 2021
    • Deucе's avatar
      Initial work on setTimeout() · 19289739
      Deucе authored
      This appears to work and the event handler *should* work on other
      event types already.
      
      Note, this is *nix-only due to the use of poll().  select() will
      need to be used for Windows to keep XP compatability.
      19289739
  18. Feb 22, 2021
  19. Feb 15, 2021
  20. Jan 24, 2021
    • Rob Swindell's avatar
      Performance enhancement for system.findstr() · 8fd71027
      Rob Swindell authored
      The first argument can now optionally be an array of strings (e.g. as read from File.readAll()), so that multiple searches of the same file (e.g. twitlist.cfg, while importing messages) does not require multiple *reads* of the same file.
      8fd71027
  21. Dec 12, 2020
  22. Dec 06, 2020
    • Rob Swindell's avatar
      Fix null pointer deref (crash) in new_user() when "client" object is invalid · e67fe56e
      Rob Swindell authored
      When system.new_user() was called but the current "client" object is uninitialized (e.g. has NULL protocol, host or IP address fields because there is no active client, e.g. because is was called from a timed event with active user online) - this code would dereference a NULL pointer and crash the b0rad. Reported by Mortifis.
      e67fe56e
  23. Dec 02, 2020
  24. Sep 19, 2020
  25. Sep 17, 2020
    • Rob Swindell's avatar
      Better sysop availability (for chat) visibility/toggleability · 6b993a0b
      Rob Swindell authored
      - JS system.operator_available property (read/writeable)
      - SYSAVAIL @-code which expands to LiSysopAvailable or LiSysopNotAvailable
        (use the new SYSAVAIL @-code in the chat menu to show availabilty to chat)
      - ;avail sysop command (in str_cmds.js) to toggle sysop availability
      - Changed LiSysopIs text.dat string to be a format string (include %s) and
        the trailing \r\n, so that it can be used in str_cmds.js or anywhere else
        to report sysop availability to chat, or can be set to blank string to
        display nothing (this would not work previously).
      6b993a0b
  26. Sep 14, 2020
  27. Aug 16, 2020
  28. Mar 31, 2020
    • rswindell's avatar
      Add 2 new system properties: · d3623484
      rswindell authored
      - min_password_length (currently hard-coded to 4)
      - max_password_length (currently hard-coded to 40)
      
      Remove 2 unused system properties (nobody uses PostLink/UTI drivers any more):
      - psname
      - psnum
      d3623484
  29. Mar 29, 2020
    • rswindell's avatar
      Add system.get_node() method to read a single node record in one shot: · 46844bb7
      rswindell authored
      use this in place of system.node_list[] if you're going to be using a lot of
      the properties and passing them around to methods which are going to each
      possibly dereference the values, as *each* deference results in a read of the
      node record in the node.dab. On my system, a simple node list (e.g. /L
      command) would result in between 60 and 100 reads of the node.dab (for a 13
      node system), which was nuts.
      
      The system.get_node() method currently leaves the node record unlocked and
      there is currently no equivalent put_node() method, so you still need to use
      the system.node_list[] for modification of node records. But, I now see there
      are race conditions with the current methods of read-modify-writes of the
      node_list[] properties. We should be locking a node.dab record, reading it,
      modifying it, writing it, and then unlocking it - as is done in the C/C++
      code. So... that's a todo item.
      
      Also created system.stats.node_gets to track the number of node.dab reads
      from a single instance of the system object. May remove this any time.
      46844bb7
  30. Mar 24, 2020
  31. Sep 02, 2019
    • rswindell's avatar
      Storing the node file (node.dab) descriptor in the scfg_t was a "bad idea" {tm} · e97522ee
      rswindell authored
      The scfg_t instances are often shared between threads and we can't really share
      file descriptors between threads, so we ended up with file descriptor leaks and
      race conditions.
      
      Instead, define/allocate/free a new js_system_private_t where the scfg_t* and
      the nodefile (descriptor) are kept - per "system" instance.
      e97522ee
  32. Aug 31, 2019
    • rswindell's avatar
      Update the C getnodedat/putnodedat API to not require that the node file · 4c8482c9
      rswindell authored
      (ctrl/node.dab) is constantly closed and re-opened for every non-locking read.
      This is really slow across network file systems and unnecessary, so use a
      similar optimization as the C++ sbbs_t class where the file can (and normally
      is) left open across multiple consecutive reads.
      Create/use opennodedat() function.
      Uses the new CLOSE_OPEN_FILE() macro from xpdev/filewrap.h.
      4c8482c9
Loading