- Mar 17, 2024
-
-
Rob Swindell authored
This resolves the conflict with MSG_HOLD definition in socket.h on MacOS: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h And hey... [NET]MSG_HOLD isn't actually used anywhere? What's up with that.
-
- Mar 07, 2024
-
-
Rob Swindell authored
-
- Feb 16, 2024
-
-
Rob Swindell authored
Don't corrupt UTF-8 strings with SAFECOPY() (use new SAFECOPY_UTF8). Some terminals (notably, Windows Terminal) display zero width UNICODE chars as a single column-wide space. <sigh> Auto-detect the zero-width "width" (1 or 0) of the terminal during connection and UTF-8 auto-detection. getstr() works a lot better now with UTF-8 strings with wide chars (e.g. emojis), but likely much more to do.
-
- Feb 07, 2024
-
-
Deucе authored
-
- Jan 25, 2024
-
-
Rob Swindell authored
-
Rob Swindell authored
Silly me, this is C++, do the C++ thing No functional change.
-
Rob Swindell authored
Seems a useful function to have on hand. Especially now that it's "fixed" (will convert "1234" to "1,234").
-
Rob Swindell authored
I noticed while testing the previous commit that 4 digit values weren't thousands-separated, while larger values were. I'm not sure why this non-zero index check was in this loop, but appears to be a bug.
-
Rob Swindell authored
- bbs.expand_atcodes() now supports formatting (did not before this) - text.dat/ini strings now support @-code formatting (did not before this) (this fixes issue #697) - bbs.atcode() now supports more complete formatting (only supported -R/-L previously) The -W (wide) formatting code is not supported in these cases since that code currently sends UNICODE sequences directly to UTF-8 terminals, when used.
-
- Jan 16, 2024
-
-
Rob Swindell authored
The 5th character must be a digit. Prevent future stupidity such as happened with recently added and then fixed NODE_USER @-code.
-
- Jan 15, 2024
-
-
Rob Swindell authored
Since "NODE*" is a match for a node number status (ugh), and this comparison happened before the comparison for "NODE_USER", we'd never hit that condition. Thought I tested this before original commit, but I guess I did not. Oops.
-
- Jan 13, 2024
-
-
Rob Swindell authored
Needed for exactly reproducing built-in node status string formatting using @-codes (only).
-
- Dec 31, 2023
-
-
Rob Swindell authored
To complete the request from: Max (WESTLINE) Is it possible to do a new dateformat in scfg In sweden we using YYYY-MM-DD format as standard. The default will be '/'. Technically, any separator is possible by editing the "date_sep" value in the global section of main.ini. SCFG allows the most popular separators: /.- and space.
-
Rob Swindell authored
... and YYYY/MM/DD for birthdate input/display. Now set in SCFG->System (not toggle options) and stored in the "date_fmt" key (new) in main.ini. The old sys_misc SM_EURODATE flag is deprecated (but used to determine the default value of date_fmt when not present). As requested from: Max (WESTLINE) Is it possible to do a new dateformat in scfg In sweden we using YYYY-MM-DD format as standard.
-
- Dec 12, 2023
-
-
Rob Swindell authored
Actually tested myself this time, needed a lot more than first appearances. Also includes a security/safety enhancement where the @-code expanded string is *not* used as an sprintf format string. Supporting both format specifiers and @-codes in a single text.dat string is tricky (always has been). For Accession.
-
- Dec 10, 2023
-
-
Rob Swindell authored
The first word of the message recipient or author's name. For Accession.
-
- Dec 02, 2023
-
-
Rob Swindell authored
-
- Oct 26, 2023
-
-
Rob Swindell authored
Whoohoo, I'm a reel STL programmerz n0w!
-
- Sep 26, 2023
-
-
Rob Swindell authored
sbbs_t::mnemonics() now supports @-codes immediately following the tilde (e.g. ~@Yes@) to use the first character of a dynamically-replaced (e.g. localized/translated) text string as a command key. Fixed issue in sbbs_t::mnemonics if multiple @-codes were specified in the string, but no space characters (just noticed this bug while reviewing). Created: sbbs_t::expand_atcodes() - used by sbbs_t::mnemonics(), exposed in JS as bbs.expand_atcodes(). bbs.text and system.text now have properties: each text string ID is the property name and the text index number (1-based) is the property value - enabling fast text string lookup without load/require text.js Constified sbbs_t::atcode() and attrstr() - not too painful Deprecated YNQP text.dat string in favor of (the first character of) "Yes" and "No" text strings and new strings: "Quit", and "PasswordChar" Other text.dat changes: ListKey->List, AllKey->Unused853 More new text.dat strings: Which, Next, Previous, Language, LANG Deprecate the "AllKey" text string Create/use sbbs_t::all_key() - first character of "All" text string New JS console properties that present common (possibly localized) command keys: yes_key, no_key, quit_key, all_key, list_key, next_key, prev_key
-
- Sep 24, 2023
-
-
Rob Swindell authored
The TEXT:<x> @-code can now be used with the text.dat string ID rather than the text.dat string number, if preferred. For convenience and brevity, ALL text.dat string IDs are now valid @-codes (case-sensitive). While this functionality is redundant with the TEXT: @-code now, if there are any conflicts between new/existing @-codes and text.dat string IDs, the TEXT: @-code can be used to overcome such conflicts. This should help with localization (to other languages) by using common single-word replacements (Which, Quit, Next, etc.) in text.dat strings.
-
- Sep 14, 2023
-
-
Rob Swindell authored
-
Rob Swindell authored
This fixes issue #629
-
- Sep 13, 2023
-
-
Rob Swindell authored
I'll add detailed docs to http://wiki.synchro.net/custom:atcodes soon, but the list is: - TERMTYPE - TERMROWS - TERMCOLS - AUTOTERM - ANSI - ASCII - COLOR - ICE - RIP - PETSCII - SWAPDEL - UTF8 - MOUSE - UPAUSE - SPIN - PAUSESPIN - EXPERT - HOTKEYS - MSGCLS - REMSUBS - FILEDESC - FILEFLAG - AUTOHANG - AUTOLOGON - QUIET - ASKNSCAN - ASKSSCAN - ANFSCAN - EDITOR - SHELL This should (at least mostly) address the issue #629
-
- Jun 10, 2023
-
-
Rob Swindell authored
No obvious bug fixes here, just future proofing.
-
- 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 21, 2023
-
-
Rob Swindell authored
This code will do nothing if there's no user logged-in or their terminal is not ANSI or their terminal dimensions (rows and cols) are set to specific values (not auto-detected). This code does the same thing as calling JS console.getdimensions(). Since it waits (up to 5 seconds) for a CPR response from the terminal, this does potentially slow down output, so caveat emptor. This could be used by a sysop to address issue #529.
-
- Mar 04, 2023
-
-
Rob Swindell authored
Handles integer overflow in the summing of user's credits and remaining daily free credits.
-
Rob Swindell authored
In a minute, this CPS value will be of more use since it'll be reflective of the user's actual download rate (in characters/bytes per second) instead of just some randomly-chosen numeric constant.
-
- Feb 19, 2023
-
-
Rob Swindell authored
Mostly [s]printf format fixups
-
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.
-
- Nov 12, 2022
-
-
Rob Swindell authored
Also add OS_CPU @-code, to report what CPU architecture the OS thinks it is. Fix the OS_VER @-code truncation bug from previous commit.
-
Rob Swindell authored
Yeah, the Windows block doesn't some unsafe concatenations still.
-
- Sep 03, 2022
-
-
Rob Swindell authored
As reported by Android8675 (SHODAN) on DOVE-Net. This problem did not manifest itself in 32-bit builds.
-
- Mar 28, 2022
-
-
Rob Swindell authored
-
Rob Swindell authored
-
- Mar 24, 2022
-
-
Rob Swindell authored
-
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 26, 2022
-
-
Rob Swindell authored
For DesotoFireflite (VALHALLA)
-
- Feb 05, 2022
-
-
Rob Swindell authored
Users with the 'O' restriction (automatically set if a new user has the same "real name" as another account, and that's allowed by the sysop) will send netmail from their alias and not their real name to prevent impersonation of another user.
-