- 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.
-
- Dec 21, 2024
-
-
Rob Swindell authored
Increment SMBLIB version to 3.10 Fix issue #845: Changing system/OS time zone, changes dates/times of posted messages Sysops and users shouldn't notice any change unless they change the time zone of their system/OS (not accounting changes for daylight/standard time) and the result will be that message dates appear the same after such a change. For backward compatibily, any stored time_t's in msghdr_t.when_written.time (i.e. all existing SMB messages) will still be decoded and displayed properly. We detect a time_t value by the upper 6 bits being non-zero. When the upper 6 bits of a when_written.time value are zero, then we know the 'year' is stored in the 16-bits before the when_written field (never used bits of the netattr field, now part of the when_t structure definition) and the Month, Day, Hour, Minute, and Second of the wallclock at the poster's site are encoded in the low 26 bits of the time field. This also eliminates more uses of 32-bit time_t that'll likely start being a problem 2038 and really fall over and die in 2106. At least messages' posting dates won't have any issue now. The "when_imported" values could use a similar treatment someday I suppose - and we could get rid of the when_imported.zone value as its not really needed we could use those 16-bits for the when_imported.year. Didn't change anything with filebases (still using time_t's though the when_written hdr field isn't used for much with regards to files). Yes, we could have converted all imported "broken down" message dates to UTC and continued to store them as a time_t using timegm() instead of mktime() for conversion to time_t, and I considered that. But we would have needed to create/use a flag in the message header to indicate such stored date/times (since they'd have to go through different adjustment for original time zone before display, basically reversing the logic of all the places we display the message dates/times using localtime verus gmtime/UTC C RTL functions), couldn't just initialize the time with a call to time() upon import of local messages (unless the local timezone happened to be UTC). And in the end, we'd still have a 32-bit time_t value. So this seemed the better path. I would have liked to have stored the date fields in a more human readable encoding (BCD or decimal, ala isoDate and isoTime_t), but I just didn't have the spare bits in the fixed portion of message headers to be wasteful like that. Here's an example from smbutil v of a message header posted after this change: when_written 03292595 41E0 Fri Dec 20 18:22:21 2024 PST when_imported 6766265D 41E0 Fri Dec 20 18:22:21 2024 PST Notice the difference in the hex encoding of the date/time between the 2 header fields: when_imported still uses time_t. The when_written.year value isn't output here.
-
- Dec 14, 2024
-
-
Rob Swindell authored
This is a solution for issue #842, but only for messages posted/sent from the terminal server using built-in functions and not via JS or other means. A more universal/generic solution would be nice (beyond just always storing message headers and bodies in UTF-8), but nothing has come to mind.
-
- 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
-
- Sep 07, 2024
-
-
Rob Swindell authored
It appears I had the idea to make the CantPost text.dat string a format string before, but never quite finished that change (e.g. made the change to email.cpp and text.dat too).
-
- Mar 05, 2024
-
-
Rob Swindell authored
The stock text.dat FileAlreadyOnline string doesn't actually contain a '%s', but if it did, it would've worked as intended in some cases, and broken badly in others. Now fixed for if/when we do actually include the filenaeme (%s) in that string.
-
- 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.
-
- Nov 22, 2023
-
-
Rob Swindell authored
In response to Nelgin's inquiry: DigitalMan would it be difficult to add login/logoff date/time to these messages? Node 2: xxuserxx logged on Telnet Node 2: xxuserxx logged off Now, you can just use @-codes to add that kind of thing to these text.dat strings.
-
- Mar 04, 2023
-
-
Rob Swindell authored
-
- Feb 27, 2023
-
-
Rob Swindell authored
Most sysops didn't know it, but if exec/feedback.* existed, it would be executed just before any user sent an email to the sysop (user #1), excluding new user validation requests: - make this module name configurable and loadable from mods - support JS module here (exit(1) to abort the feedback) - invoke for email being sent to *any* sysop (not just user #1) - don't invoke the module when sending *from* a sysop account This fixes issue #16
-
- Feb 19, 2023
-
-
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.
-
- Feb 17, 2023
-
-
Rob Swindell authored
The validation user (required new user feedback user number) and error notification/level settings don't make sense under node settings in today's world where all nodes typically run on the same system and serve the same BBS. Moved from SCFG->Nodes->... Advanced Options to (new sub-menu) SCFG->System->Notifications. Likewise, these 3 settings (valuser, erruser, errlevel) were moved from node*/node.ini to ctrl/main.ini. If you're already running v3.20a, then you'll want to make sure you set these in SCFG->System->Notifications how you prefer them as the migration (now handled in upgrade_to_v320.js) won't have been done for you automatically. The default is no-new-user-feedback required and no-error-notification user set. Added a prompt to the SCFG setup wizard to prompt for this setting since it still is a FAQ. Other cosmetic changes to SCFG help and setup wizard.
-
- Oct 18, 2022
-
-
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).
-
- 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.
-
- Sep 25, 2021
-
-
Rob Swindell authored
As discovered by Keyop and reported via IRC, when replying *to* a local mail box and *not* using the hard-coded email menu (e.g. when when using msglist.js), the original message's "Replied" attribute flag was not set. When replying to a netmail address (at least, Internet or FidoNet, unsure about QWKnetmail), the attribute would be set. This discrepancy was because this email() function doesn't use the "modern" smb_addmsg() function (which also calls smb_updatethread()), but add the message body text the old/manual way and never called smb_updatethread(). smb_updatethread() does the thread linkage stuff (which is usually unnoticed in the mail base) *and* sets the "Replied" attribute of the original message, if it's not already set. This function should be overhauled to use smb_addmsg(), but this 2-line change at least addresses this issue for now. There's probably other places (e.g. importing mail replies via QWK/REP packets) where this thread-linkage and "Replied" attribute flag setting is still not happening.
-
- Jun 06, 2021
-
-
Rob Swindell authored
(prints the bad filename) - also, checkfname() is going to do the file.can (trashcan) checking, so no need here
-
- May 16, 2021
-
-
Rob Swindell authored
-
- 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...
-
- Feb 15, 2021
-
-
Rob Swindell authored
-
Rob Swindell authored
-
Rob Swindell authored
Hopefully not introducing any bugs in the process.
-
Rob Swindell authored
Hopefully not introducing any bugs in the process.
-
- Sep 12, 2020
-
-
Rob Swindell authored
Don't prompt a new user to forward email to their netmail address if they provided an invalid netmail address (not supported by the system). If a sysop has an invalid netmail address setup for forwarding, don't try to forward email (or new user feedback) to that address. Re-ordered the new user terminal questions a little bit (ask for the backspace key first, to get earlier manual PETSCII detection). I'm not sure why I was enabling AUTOTERM along with PETSCII before. Removed that as PETSCII cannot be auto-detected.
-
- Sep 07, 2020
-
-
Rob Swindell authored
Eliminate the hack in each server where it will over-write startup host_name (with the configured Internet email address), if it's blank. This hack was subject to a race condition where the parent app (e.g. sbbsctrl.exe) would clear or re-initialize the host_name after the sever threads had initialized. Instead, just use a function which will return either the startup->host_name or (fallback to) scfg.inet_addr.
-
- Aug 16, 2020
-
-
Rob Swindell authored
-
- Apr 15, 2020
-
-
rswindell authored
-
- Aug 02, 2019
-
-
rswindell authored
auxattr flag since we normally want the attach file to be deleted automatically when the message is delivered. SBBSecho now won't be deleting the file attachment unless this flag (or the .msg \1FLAGS "KFS" equivalent flag) is set.
-
- Aug 01, 2019
-
-
rswindell authored
to putmg() when displaying messages in the sub on the terminal server. E.g. to disable word-wrap for *all* messages displayed in a sub, set P_WORDWRAP in sub_t.n_pmode.
-
- Jul 08, 2019
-
-
rswindell authored
fidodefs.h:47:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define FIDO_CHARSET_UTF8 "CHRS: UTF-8 4" /* FTS-5003 */ ^ writemsg.cpp:645:15: note: in expansion of macro 'FIDO_CHARSET_UTF8' *charset = FIDO_CHARSET_UTF8;
-
rswindell authored
(e.g. applies to email and netmail now too).
-
- Apr 12, 2019
-
-
rswindell authored
(default: off) - when enabled, the current terminal width (columns) will be saved in the msg header. When using the internal msg editor or raw intput mode, the columns are always saved in the message editor. fseditor.js should have this option enabled.
-
- Feb 20, 2019
-
-
rswindell authored
(JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto- create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE) with a custom-created quote file (e.g. with msg tails), that'll still work as before (e.g. DDMsgReader.js). bbs.email() and bbs.netmail() now support an optional reply_header_object argument which works like bbs.post_msg(). These methods (and the underlying C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the quote file now, when the WM_QUOTE mode flag is *not* set. The auto-created quotes.txt now includes the plain-text version of MIME-encoded messages. the bbs.post_msg(), email(), and netmail() methods now all support reply header objects that came directly from bbs.get_msg_header() *or* copies of such header objects (but the auto-quoting feature won't work when supplied this type of header object). So if passed a header object returned from bbs.get_msg_header(), we can now use the message base (for auto-quoting) and the underlying msg storage directly (no JS parsing necessary). This is what the new js_GetMsgHeaderObjectPrivates() function is used for. js_ParseMsgHeaderObject() (and the underlying parse_header_object() function) now supports either an actual internally-generated msg header object (e.g. returned from bbs.get_msg_header()) or one that is a copy or hand-constructed. quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't have to since we can now get to underlying msg storage in the js_msgbase.c via js_GetMsgHeaderObjectPrivates(). quotemsg() now reads only the plain-text portion of MIME-encoded messages. As part of this effort, I modernized the method prototypes using default argument values (e.g. WM_NONE for wm_mode arguments) and removed some extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are automatically added by the sbbs_t::email() and *netmail() functions). savemsg() now *does* support reply-IDs/thread-linkage via the additional 'remsg' argument (when non-NULL). Replaced some use of nulstr with NULL. Replaced more boilerplate SMB open code with calls to smb_open_sub().
-
- Feb 17, 2019
-
-
rswindell authored
-
rswindell authored
So I created a single add_msg_ids() function (mostly migrated from postmsg.cpp) to make this incredibly easy so any/everywhere that adds a message to a message base should be able to call it. This function also creates reply-IDs (when relevant) and program ID (Fido-PID) header fields: - FIDOPID (always) - FIDOMSGID (if an echomail post) - FIDOREPLYID (if an echomail reply-post) - RFC822MSGID (always) - RFC822REPLYID (if a reply)
-
- Oct 30, 2018
-
-
rswindell authored
message text (when relevant and available) - this helps when re-wrapping the message text (e.g. for quoting) and not always guessing "80 columns".
-
- Aug 03, 2018
-
-
rswindell authored
sbbs::lputs() will log the current user alias already, logline()->lputs() would create log messages with the user alias twice.
-
- Jun 10, 2018
-
-
rswindell authored
- similar to what we do in netmail() with the WM_NETMAIL flag. If you call writemsg() without WM_EMAIL set, it tries to use the subnum as an index into the sub-board array and will crash.
-