1. 31 Mar, 2022 1 commit
    • Rob Swindell's avatar
      Lower level of new "Logoff time <= logon time" log message · 141112e1
      Rob Swindell authored
      ... from ERROR to WARNING, but log the human-readable logon time too.
      This condition can easily happen if the system clock is corrected (e.g. a few seconds via NTP adjustment) during a quick connect/disconnect.
      Don't call logoffstats() unless a user actually successfully logged-in. I don't think sysops actually want all the time bots sit at the logon prompt counted as "time online" in their stats anyway.
  2. 28 Mar, 2022 1 commit
    • Rob Swindell's avatar
      Overhaul statistics files · 908a31be
      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.
  3. 13 Mar, 2022 1 commit
  4. 10 Mar, 2022 1 commit
  5. 04 Mar, 2022 1 commit
  6. 02 Mar, 2022 1 commit
    • Rob Swindell's avatar
      Batch download queue not cleared upon packed QWK packet · b9e78bdf
      Rob Swindell authored
      Before the "new filebase" merge of 2021, a user's batch download queue would be cleared when a QWK packet was successfully packed for them via the event thread (i.e. triggered via semaphore file). That was lost in the new filebase change (the batch download queue would not be cleared) - caught by Coverity (CID 350336).
      It appears pre-packed QWK packets never cleared the batch download queue (does anyone actually use this feature in this day and age?) - fixed.
  7. 28 Feb, 2022 1 commit
  8. 24 Feb, 2022 1 commit
  9. 21 Feb, 2022 1 commit
    • Rob Swindell's avatar
      Refactor timed-event and QWKnet call-out scheduling · b269b65a
      Rob Swindell authored
      Reduced probably the biggest if() conditionals in sbbs to a single line by breaking the "time to run" logic into separate functions and sharing those functions between both QWKnet and timed-event scheduling. There was no actual problem with this code/logic, it was just very difficult to read and understand and step-through with a debugger and understand why or why not an event might run under different configurations and circumstances.
      Also removed the PostLink network call-out logic. pnet.dab is no longer read and written-to and if you happened to have any PostLink hubs configured (how?!?), they'll no longer be "polled". This is the only functional change unless I did something wrong in the process.
      One thing I noticed and contemplated, the current time is not queried between consecutive timed-event scheduling/execution. It's possible that an executed event can take a long time and impact the criteria for the next timed event. The events are checked for scheduling every few seconds, so I can't really think of a big down-side to the current design (apparently intended to reduce unnecessary querying of the current date/time), so I didn't do anything to change that. Just something I noticed.
  10. 06 Feb, 2022 1 commit
    • Rob Swindell's avatar
      Clear mouse hot spots (if any) before hanging up. · dbf0a87a
      Rob Swindell authored
      <nelgin> Ah, here's a good one. If I ssh to my bbs server, then ssh to my bbs, do whatever then /O to logout, when I left click in the putty window I get "0;98;20M0;98;20m and stuff like that. I have to run reset to get it working properly.
  11. 28 Jan, 2022 1 commit
    • Rob Swindell's avatar
      Use sbbs.ini [web] FileVPathPrefix to configure web filebase prefix · acd808d3
      Rob Swindell authored
      It bothered Deuce having a web server setting in scfg_t/SCFG->File Options, so I moved this setting to [web_]startup_t and the sbbs.ini file.
      The downside is that file_area.web_file_prefix is no longer available to JS environments outside of the web server and terminal server, but meh, probably not going to use it elsewhere anyway? I can imagine use cases for JSexec scripts to want to generate URLs to filebase files. If that ends up being a need, they'll have to find and parse the "right" sbbs.ini file to determine the vpath prefix. 
  12. 19 Jan, 2022 1 commit
  13. 11 Jun, 2021 1 commit
  14. 10 Jun, 2021 1 commit
    • Rob Swindell's avatar
      mv() simplified for the non-copy case · 80422644
      Rob Swindell authored
      Constified function arguments. Source path is still case-insensitive, but destination is case-sensitive (hopefully that's not an issue).
      When a "move" (!copy) is requested, a rename() is always attempted first and if successful, job done. Otherwise, we continue on with the file-copy (and then remove).
      This should resolve CID 332219 (DEADCODE).
  15. 09 Jun, 2021 1 commit
  16. 28 May, 2021 1 commit
    • Rob Swindell's avatar
      Add optional "temp file transfer" module (defaults to "tempxfer"[.js]) · 18aaca6b
      Rob Swindell authored
      This module (name configurable in SCFG->System->Loadable Modules) replaces the old hard-coded temp/archive file menu in v3.18 and earlier, going all the way back to v1a. Good-bye to yet more old and crufty Synchronet C source code. :-/
      Change the "Pre Xtrn Prog" and "Post Xtrn Prop" menu option in SCFG->System->Loadable Modules to just "Pre Xtrn" and "Post Xtrn". The help text had the wrong names anyway (now fixed).
      Save the menu lightbar position in the "Loadable Modules" SCFG menu.
  17. 17 May, 2021 1 commit
  18. 16 May, 2021 1 commit
    • Rob Swindell's avatar
      Log local address in passthru connection failure · 4a705a46
      Rob Swindell authored
      Altere reported via IRC:
      !ERROR -1 (113) connecting to passthru socket
      It might be helpful to know the address the passthru socket is bound to and the connection is being attempted on, so log that with the error.
  19. 13 May, 2021 1 commit
    • Rob Swindell's avatar
      Attempt to resolve "!ERROR 11 receiving from socket" reported by plt · 3202b477
      Rob Swindell authored
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 <plt> append key into keybuf: 4E (N)
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 <plt> Executing external: /sbbs/exec/sexyz 14 -Telnet sz /mnt/disk1/dl/COCO/AGI/agi-xmas.zip
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 <plt> sexyz: Synchronet External X/Y/ZMODEM  v3.0  master/23b741a1  Copyright Rob Swindell
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 <plt> sexyz: !File skipped by receiver
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 <plt> sexyz: !File Skipped
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 <plt> sexyz: !0 Aborting Transfer (Sending ZABORT)
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 !ERROR 11 receiving from socket 14
      <plt> May 13 00:39:40 sbbs synchronet: term Node 1 input thread terminated (received 365 bytes in 35 blocks)
      Not sure why this isn't happening for other sysops - perhaps plt was spying on the node?
  20. 19 Apr, 2021 1 commit
    • Rob Swindell's avatar
      Control sound-mute via semfile (ctrl/sound.muted) rather than sbbs.ini · a88cce19
      Rob Swindell authored
      There was a bug with reloading the configuration files in sbbsctrl where the sound button no longer reflected the truth and the sysop's previous click-state of the button was lost. Rather than going through writing the OPT_MUTE flag to the Options fields of all the sections of the sbbs.ini and then re-loading that file as a result, just do like we did with the sysop chat availability: use a semfile. So much simpler.
      If anyone ever needs instance-specific muting, we can create/check instance/host-specific mute semfiles then. Doubt that'll happen though.
      Also, removed the old sysavail control methods of ntsvcs too.
  21. 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
  22. 05 Apr, 2021 4 commits
    • Deucе's avatar
      More closely reproduce select() behaviour when using poll() · b5b02ba5
      Deucе authored
      Specifically, have errors mean the fd is "ready".
      Also, fix some extra revent clearing and a spy socket issue while
      we're looking at this code.
      Should fix issues with CGI scripts that close stdin/stdout but do
      not terminate, and maybe deal with some other corner cases at the
      same time.
    • Deucе's avatar
      EVN MR! · 5bf7a847
      Deucе authored
    • Deucе's avatar
      MOAR! · 9b14bb14
      Deucе authored
    • Deucе's avatar
      Spaces -> Tabs · 59bb0c3d
      Deucе authored
      Tabs are the shit.
  23. 04 Apr, 2021 3 commits
  24. 02 Apr, 2021 1 commit
    • Deucе's avatar
      Initial work on setTimeout() · ad635a64
      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.
  25. 31 Mar, 2021 2 commits
    • Deucе's avatar
      Fix error in last commit. · 8f0ae86b
      Deucе authored
      Looks like I was partially restoring old code before I stopped.
    • Deucе's avatar
      Use new PREFER_POLL define to control poll() usage · 3de05e2d
      Deucе authored
      Rather than depending on _WIN32 which is silly, make it clear what
      exactly is being done and why.
      Note that the spy socket stuff and some external stuff on *nix have
      had the select() implementation removed.  To support using select()
      on !Win32 will require de-refactoring that's not really worth doing.
      Instead, just use #error and reference the commit where the old
      code can be found.
  26. 30 Mar, 2021 1 commit
    • Deucе's avatar
      Initial poll() work · af30c430
      Deucе authored
      Still needs updates in services_thread(), CGI stuff in websrvr.c,
      and sbbs_t::external()
  27. 17 Mar, 2021 1 commit
  28. 16 Mar, 2021 1 commit
  29. 15 Mar, 2021 3 commits
  30. 06 Mar, 2021 2 commits
    • Rob Swindell's avatar
      Allow fine-grained control over JavaScript compiler options via *.ini · 2c7f3bc6
      Rob Swindell authored
      JavaScriptOptions bit-field can be set in sbbs.ini and jsexec.ini to over-ride the default JS compiler options which have been changed from 0 to (options previously only used by JSDoor):
      * JIT - TraceMonkey
      * METHODJIT - JägerMonkey
      * COMPILE_N_GO - compile-time scope chain resolution of consts
      * PROFILING - Choose between TraceMonkey and JägerMonkey at compile-time based on profiling results
      Other options available but not enabled by default:
      * STRICT - warn on debious practice (i.e. similar to "use strict")
      * WERROR - convert warnings to errors
      * VAROBJFIX -  use last object on scope chain as the ECMA 'variables object'
      * RELIMIT - Throw exception on any regular expression which backtracks more than n^3 times, where n is length of the input string
      * ANONFUNFIX - Disallow function () {} in statement context per ECMA-262 Edition 3.
      * METHODJIT_ALWAYS - Always whole-method JIT, don't tune at run-time.
      - Fixed JS warning string formatting (missing space separator).
      - Removed an extraneous new-line in lprintf() call in mailsrvr.
      - Added basic assertEq() global method to jsexec, required when running SpiderMonkey test scripts.
    • Rob Swindell's avatar
      Don't leave the logged event code as "DAILY" after daily events run · f4d33f43
      Rob Swindell authored
      I noticed "DAILY ... Semaphore signaled" in the event thread log output. Now fixed.
  31. 22 Feb, 2021 1 commit