- Jan 14, 2025
-
-
Rob Swindell authored
... using uncrustify mod_paren_on_return config
-
Rob Swindell authored
White-space changes only, exception being the rare insertion of NL before closing brace (couldn't find the option to disable that behavior). I excluded some header files (e.g. sbbs.h) since uncrustify seemed to be doing more harm than good there. I might just end up applying different set of rules to .h files.
-
- Jan 11, 2025
-
-
Rob Swindell authored
e.g. [can|is]_subject_something() is now named subject_[can|is]_something() No functional change.
-
- Jan 10, 2025
-
-
Rob Swindell authored
... and download events. The "Native Program List" was a hack left over from the transition from MS-DOS to OS/2 and now with extensible configuration files, like we have now, there's no reason not to add more fields and make it easier to specify which of these programs (most/all of them nowadays) are actually native to the host OS. The defaults (e.g. when creating a new file type) are unchanged for now.
-
- Dec 01, 2024
-
-
Rob Swindell authored
getnodedat() now performs a non-locked read by default. Perform more checks of getnodedat() return value before calling putnodedat() to avoid unintentionally zeroing out node.dab records. Add/use unlocknodedat() method for unlocking a node.dab record without writing. Note: The userdat.c getnodedat() and putnodedat() still return int (i.e. 0 on success), so that can be confusing.
-
- Oct 28, 2024
-
-
Rob Swindell authored
This is a code clean-up, no change in functionality
-
- Oct 16, 2024
-
-
Rob Swindell authored
So apparently 23 years ago (almost 24), I made a typo in commit 7731d16d that broke the batch transfer menu for RIP users. Also elminated silly/unnecessary loop-control variable ('done'). I'm working on a port to JS and noticed these oddities (so far).
-
- Oct 12, 2024
-
-
Rob Swindell authored
Created sbbs_t::batch_upload() and JS bbs.batch_upload() returns true if one or more blind-uploads were received and all files in the batch upload queue (if any) were received The Rainbow Ctrl-A codes (x|X) are not valid for message (there's no universal ANSI equivalent) - so treat as "invalid Ctrl-A codes" for most (message) uses. e.g. they're stripped when entered into text with the internal message editor. sbbs_t::chkpass() and JS bbs.good_password() now default to *not* requiring the password to be substantially different from the user's current password. This fixes weird issues where a user that just wanted to add more characters to their current password woudl not be allowed by cause the new password was "too obvious" JS bbs.good_password() now accepts an optional second argumnet: forced_unique which defaults to false. sbbs_t::chkpass() (JS bbs.good_password()) would always return false if the provided password was the same as the user's current password, regardless of the 'unique' parameter value. Now, only reject unchanged password when unique is true. sbbs_t::upload() and JS bbs.upload_file() now accept an optional second argument: 'filename' which when specified, the function won't prmopt for the user-supplied filename. New JS property: file_area.max_filename_length file_area.min_diskspace, settings, and web_vpath_prefix are now read-only. These properties should not have been writable.
-
Rob Swindell authored
That was a badly named function.
-
- Aug 08, 2024
-
-
Rob Swindell authored
When a user has a "default download protocol" selected (configured for their user account), don't display a menu of file transfer protocols when we're just going to auto-select their default anyway (e.g. when downloading a QWK packet). This change also introduces an argument (%s, the protocol name) in the StartXferNow text.dat string, so that if/when the user forgets which default download transfer protocol they had selected, they'll be reminded ("oh yeah, I need start an XMODEM download!"). This fixes issue #767
-
- Apr 28, 2024
-
-
Rob Swindell authored
WIPterm hasn't been supported in ages and HTMLterm was just an ephemeral experiment. Leave the WIP ARS keyword parsing support, for backwards script compatibilty.
-
- Mar 05, 2024
-
-
Rob Swindell authored
-
Rob Swindell authored
... the library and directory (short) names Making it more obvious *where* the referenced file has already been uploaded.
-
- Jan 20, 2024
-
-
Rob Swindell authored
Still using BOOL where we need Win32 API compatibility. Using JSBool instead of BOOL or bool where it matters. Changed most relevant TRUE/FALSE to true/false too (though it's not as critical). You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case. Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case. For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef). I didn't convert UIFC yet. This addresses issue #698
-
- Jun 09, 2023
-
-
Rob Swindell authored
So Clang-FreeBSD was warning (in compiles of scfg/scfg*.c by Deuce): result of comparison of constant 100000 with expression of type 'uint16_t' (aka 'unsigned short') is always true Why? Cause a uint16_t's max value is 65535 (less than 100000). Sure we could have just lowered the UIFC max number of config items to 65535, but that would have been too easy. And why are these compared-with values of type uint16_t to begin with? Because most ctrl/*.cnf lists (of configuration items) were limited to 65535 entries cause ... 16-bit DOS, historically. Now that *.cnf files aren't used, we could just increase these scfg_t.*_total type sizes from 16 to 32-bits, yeah? The result is this commit. I went to (signed) int so we could still keep -1 as the special illegal sub/dir num value (e.g. INVALID_SUB, which is sometimes used to indicate the email message base). Theoretically, 2 billion configuration items could be supported in these lists, but SCFG will limit you to 100000 anyway. So there's a whole lot of s/uint/int in this commit. I'd be very surprised if this doesn't result in some new GCC/Clang warnings, but at least the old "comparison of constant 100000" warnings are now gone!
-
- Mar 11, 2023
-
-
Rob Swindell authored
Does exactly the same thing, no change in behavior and unlikely there's any change in performance.
-
- Mar 04, 2023
-
-
Rob Swindell authored
Handles integer overflow in the summing of user's credits and remaining daily free credits.
-
Rob Swindell authored
Caught by a GCC warning.
-
Rob Swindell authored
Upon successful download of a file, recalculate and store the user's download CPS (characters/bytes per second), mainly for subsequent transfer time estimates.
-
- Mar 03, 2023
-
-
Rob Swindell authored
If a file gets added to a batch download queue that a user doesn't have download-access to (at the time of batch download), deal with that gracefully and consistently. start_batch_download(): - Now checks current user access to download the file in both single-file and batch modes - Now performs credit-check in single-file mode (wasn't doing so previously) - totalsize of multi-file batch download queue is now calculated again (apparently removed/broken in the new filebase conversion of v3.19), so download ETA should be calculated more accurately (?) again - Use gettimetodl() to calculate each file's download time for multi-file downloads - Using new putnode_download() method to write node downloading "action" and ETA-in-aux fields - The node status wasn't being updated at all before start of download in single-file mode - fixed create_batchdn_lst() : - Checks each file still downloadable by the user and if not, removes from the queue (and the generated list file). - Performs credit check and removes files that exceed available user credit - returns true only when 1 or more files is added to the batch download list file addtobatdl() - Removed redundant 'D' restriction check - this is handled by can_user_download() check already. - Use the 'reason' out parameter from can_user_download() to determine which error string to display (not always CantDownloadFromDir).
-
- Feb 26, 2023
-
-
Rob Swindell authored
You want to replace the built-in batch file transfer menu with your own loadable module across all command shells? Now you can.
-
- Feb 12, 2023
-
-
Rob Swindell authored
This fixes issue #516
-
- Dec 30, 2022
-
-
Rob Swindell authored
Oversight probably during the new filebase overhaul in v3.19. Reported by Nelgin.
-
- Nov 17, 2022
-
-
Rob Swindell authored
Upload and Download ARS must be matched *and* the directory's upload and download ARS. Operator and Exemption ARS must be matched *or* the directory's operator and exemption ARS.
-
- Nov 12, 2022
-
-
Rob Swindell authored
Now, if the BOOL argument value is FALSE, then the .ini file is opened read-only (and thus only read permissions are needed, resolving issue #455). If the BOOL argument value is TRUE, create-if-not-exist is implied. There are no use cases where we would want to open an .ini file for writing only if it already existed.
-
- Apr 28, 2022
-
-
Rob Swindell authored
This insures that the 'R'emove file option will work correctly if when displayed sorted.
-
Rob Swindell authored
-
- Mar 24, 2022
-
-
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
-
- Mar 21, 2022
-
-
Rob Swindell authored
To fully support files > 4GB in size in file bases, credit values larger than 32-bits must be supported too. There's a couple of todo comments/items included in this commit, but that's mainly to do with messages (which don't really have costs anyway). The main thing to deal with now is the fact that users can't have more than 4GB in credits in the first place! That's got to be fixed next.
-
- Feb 24, 2022
-
-
Rob Swindell authored
-
Rob Swindell authored
CID 330961
-
- Feb 01, 2022
-
-
Rob Swindell authored
Testable File Types and Download Events support working strings (display before/while the command-line executes). Clear the current line (displaying this working string) when the execution completes.
-
- Jan 27, 2022
-
-
Rob Swindell authored
This fixes issue #328. The user actually *can* remove files from the batch queues in v3.19b, but you have to type the filenames which is not obvious from the prompt which implies you need to type the file index position (e.g. '1' for the first file in the queue). In all Synchronet versions prior, you could only remove by number (and not by name). The fix is to allow either the number or the name of the file to be entered at the RemoveWhich prompt and the file is removed from the queue successfully. Thanks Ragnarok!
-
- Jan 20, 2022
-
-
Rob Swindell authored
Default the progress time interval to 500 milliseconds (twice a second). Don't specify a count/call interval in the call-sites, since we really want to use time-based progress updates now only and the default probably will work fine everywhere.
-
- Nov 18, 2021
-
-
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.
-
- Oct 23, 2021
-
-
Rob Swindell authored
When there's no "uploads" directory configured by the sysop, cfg.upload_dir will be set to INVALID_DIR, which cannot be used as an index into cfg.dir[] to determine if the time used for uploading the files should be "given back" to the user. In v3.18, we used the first file in the upload queue, if there was one, else fell back to the "uploads" dir (which had to have been defined if there were no files in the queue). So this illegal array indexing was a regression in v3.19. Reported by Zoltán Gábor on Facebook
-
- Jun 10, 2021
-
-
Rob Swindell authored
Not that it really matters, but perhaps it'll matter in the future. And the code reads better.
-
- Jun 06, 2021
-
-
Rob Swindell authored
The BadFilename text.dat is now a format string (prints the bad filename). Use the nice progress() display status while searching for duplicate filenames.
-
- Apr 04, 2021
-
-
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...
-
- Aug 16, 2020
-
-
Rob Swindell authored
-