- 18 Sep, 2020 1 commit
-
-
Rob Swindell authored
When a sysop wants to chat, he wants to chat right now, damnit!
-
- 13 Sep, 2020 2 commits
-
-
Rob Swindell authored
Fix reported and observed crash in cleanup() (in ftp, mail, websrvr) when failing to create the temp directory. This was due to cleanup() being called before the protected integer "active_clients" was initialized. Also, md() needs to return the errno value (not a BOOL) since the caller may be in another DLL with a different errno (which likely has a value of 0/no error).
-
Rob Swindell authored
... in other non sbbs.dll modules (e.g. *srvr.dll). So now log error messages elsewhere where appropriate. DLL-exported and optimized md() a bit.
-
- 12 Sep, 2020 1 commit
-
-
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.
-
- 07 Sep, 2020 1 commit
-
-
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.
-
- 30 Aug, 2020 2 commits
-
-
Rob Swindell authored
Rather than introduce yet-another-external-program/config flag to enable the "new JS run-time/context" per invocation of any particular JS command, I'm using the XTRN/EX_SH ("Use Shell") option as it had no function for JavaScript command-lines and the concept is similar. So if you want to invoke a JS external program/timed-event in its own "sandbox", enable the "Use Shell / New Context" option for that program/command in SCFG. There may be performance penalties when running JS mods in this way, but you get the benefit of isolating one JS module from all others, if/when necessary.
-
Rob Swindell authored
As reported by Ragnarok and The Lizard Master, invoking a JS global hot-key handler (e.g. hitting Ctrl-U or Ctrl-P with the privatemsg or nodelist modules installed as handlers) would lead to the global object being cleared/corrupted so other scripts would then fail to run correctly (e.g. Error: can't open sbbsdefs.js: No such file or directory) This probably explains the JS_GC/JS_ENDREQUEST change needed when the hotkey-specific JS runtime/context/scope was introduced last year. Should revisit that too.
-
- 29 Aug, 2020 1 commit
-
-
Rob Swindell authored
Fix problem introduced in b1ecd9b6 (August 8, 2019) When sbbs_t::printfile() is used to display a file that is < 2MB in size and the P_OPENCLOSE mode flag was not specified, the file is read and displayed one line at a time. This allows for the quick display of very large files. This was accomlished by calling sbbs_t::putmsg() for each line. Unfortunately, putmsg() would save and restore console mode flags like the auto-screen pause control flags stored in sbbs_t::sys_misc so this would render some features like the POFF @-code, inoperable. This problem was reported by WitNik with files displayed from Bulleeye! Bulletins. Other issues were discovered with the WORDWRAP/WRAPOFF @-codes. Fixed with the addition of sbbs_t::putmsgfrag() which is used by printfile() to display a message fragment (one line) without saving/restoring console state flags.
-
- 17 Aug, 2020 1 commit
-
-
Rob Swindell authored
-
- 16 Aug, 2020 2 commits
-
-
Rob Swindell authored
If jsexec is used for a CGI script and the SBBSCTRL env var was not set, a warning would be printed (to stderr), even if the -c option was used to specify the path to the ctrl dir. get_ctrl_dir() now accepts a boolean argument to specify whether to print a warning when the default value ("/sbbs/ctrl") is used. Pass FALSE for jsexec, TRUE for other callers (currently).
-
Rob Swindell authored
-
- 10 Aug, 2020 1 commit
-
-
rswindell authored
filter incoming messages, including vote/poll messages. This should address Nightfox's bug report that polls posted by twit-listed users were still imported/posted on his BBS.
-
- 08 Aug, 2020 1 commit
-
-
rswindell authored
The problem: the sysop (me) is not notified of critical errors (e.g. synchro.net zone file problems) in a timely manner. Part of the solution: notify a configured user (e.g. user #1) via short-message/telegram and email/netmail logged-errors when messages of a configured severity (e.g. "Critical") are logged. The second part of the solution (coming next) will be allowing timed events to log a message of a configurable severity logged when the event fails (returns a non-zero error level to sbbs). I'm saving the error-notification-user-number and log-severity as part of the node.cnf file because: - that's where the validation user number is already set - I can conceive of a large system were certain node ranges (different instances of sbbs) might want different operators to be notified of logged-errors This also means I eliminated all the legacy com port/modem stuff from the end of the node.cnf file. None of that is used in sbbs v3. Also included in this commit are improvements around logging: - reduce the severity of UDP recvfrom failures in services - a more detailed log message when the mail server successfully delivers an email (via SMTP) - easier to answer the question: was that email you/they sent delivered successfully?
-
- 01 Aug, 2020 2 commits
-
-
rswindell authored
automatically revert to Raw/TCP mode. This resolves the issue of users that connect using modem/serial emulators over TCP that do not actually support Telnet and then either try to transfer files, which usually will not work due to escaped (or unescaped) IAC (0xFF) characters, or the user may be sent Telnet Go Ahead (GA) sequences which may display as periodic garbage in their terminal program. This seemed like a better solution than having (yet another) dedicated terminal server port for "raw" connections over TCP, though a "raw" port still might not be a bad idea for a future enhancement. RLogin is already super close to "raw", so it's probably not really necessary to have another port configured/listening.
-
rswindell authored
An experimental external() mode flag that runs JS modules in their own separate runtime and context - currently does not work (appears to corrupt the shared JS context). Not actually used currently. The reason I wanted to run a JS module (actually JS doorgame) in its own context was to get useful error messages (filenames and line numbers) when the module throws an exception. Currently, the error is just reported as occuring in xtrn_sec.js, which isn't helpful or correct.
-
- 15 Jul, 2020 3 commits
- 26 May, 2020 1 commit
-
-
rswindell authored
Create sbbs_t::random_menu() (JS bbs.random_menu()) - to make the display of a randomly-chosen menu file from text/menu, very easy.
-
- 24 May, 2020 1 commit
-
-
rswindell authored
Create sbbs_t::cursor_getxy() which gets the current x/y coordinates even for non-ANSI terminals (using the locally-tracked cursor position).
-
- 19 May, 2020 1 commit
-
-
rswindell authored
Move term_env from static (BSS) variable to sbbs_t member. Static member function variables are shared among threads, so this was just a race-condition waiting to happen. <grimmace>
-
- 11 May, 2020 2 commits
- 09 May, 2020 1 commit
-
-
rswindell authored
Both hungry/liberal hot-spots and strict hot-spots can be defined now, at the same time. For Nelgin. Use ^A` to define a single-char strict hot-spot using Ctrl-A codes. Unfortunately, this usurps the "home" Ctrl-A code which nothing seems to use but has now been changed to ^A'. Use ` instead of ~ in mnemonics to define strict single-char hot-spots (also displays the cmd key in [] instead () on non ANSI/PETSCII terms). Use @` instead of @~ codes to define strict hot-keys. Use HOT:STRICT @-code to declare a strict hot-key color. Use HOT:HUNGRY @-code to toggle back to hungry color-defined hot-keys (the default). New optional boolean argument to JS console.add_hotkey(), hungry = true by default.
-
- 08 May, 2020 4 commits
-
-
rswindell authored
- "HOT" by itself will set the hot-spot attribute to the *current* attribute (just colorize the @-code in your editor the same as you do your cmd keys no need to memorize color-code mnemonics) - "HOT:OFF" will turn off the hot-spot attribute through the end of the text or util re-enabled - Use a more greedy/liberal hot-spot matching algoirthm so that hot spots can overlap and the "best" one will be chosen. No way to opt-out of this algorithm (e.g. to use a conservative matching algo) currently. - Earlier parse of @~ codes to keep text prestine (no parsing of |* or -*)
-
rswindell authored
A more convenient method of creating mouse hot spots in a display (e.g. menu) file: New "HOT:<attr>" @-code allows you to define a specific combination of attributes (colors) that will be used to exclusively create clickable command keys or words in a file. Every set of charcters in the display file that uses that specific combination of attributes will become an automatic mouse hot spot. The <attr> is specified using a set of attribte mnemonics (e.g. "YH" for high-intensity yellow), the same set used in attr.cfg and other places in sbbs. This allows more WYSIWYG style menu editing (e.g. use PabloDraw), you just need to be careful with your choice of colors. You cannot send white-space or control characters with this method and the clickable text is the exact text that will be put in the keyboard buffer.
-
rswindell authored
and JS console.keyboard_buffer_space() and keyboard_buffer_level() ... for tracking the number of character spaces used and available in the the (unget)keyboard input buffer.
-
rswindell authored
- hot spots are clickable screen areas (e.g. in menus and prompts) that generate key-strokes - commands may be from 1 to 127 ASCII-characters in length - currently using the X10 mouse reporting mode, may change - all mnemonics strings (~Example) are automatically hot-spots - The new ~ @-code defines a hot spot - Any screen-clear operation clears all hot spots - sbbs now tracks the current screen (cursor position) row - eliminated the old "tos" (top-of-screen) boolean (row == 0 indicates "tos") - created an sbbs_t::ungetstr() method - keep track if in pause (hit a key) prompt, for special mouse behavior new JS console object: - row property - tos property is now read-only (and deprecated) - new methods: add_hotspot() clear_hotspots() scroll_hotspots() redrwstr() gets some UTF8 touch-ups as part of this commit. <shrug>
-
- 04 May, 2020 1 commit
-
-
rswindell authored
When inkey() receives an ANSI escape sequence it doesn't need to consume, put the consumed characters into the keyboard buffer *ahead* of whatever else is in the keyboard buffer already. Uses new ungetkey() insert mode option.
-
- 30 Apr, 2020 2 commits
-
-
rswindell authored
ctrl/*.cpp includes this file and does not use/include libjs.
-
rswindell authored
the name of a scalar property in either the current scope (by default) or the scope of the object passed to: - bbs.menu() - console.putmsg() - console.printfile() - console.printtail() The 'name' cannot be an array element (e.g. myprop[0]) or a nested object reference (e.g. myobj.myprop): just a single property name that can be converted to a string. Also, bbs.menu() now accepts an optional print-mode argument (default: P_NONE).
-
- 28 Apr, 2020 1 commit
-
-
rswindell authored
current column is > 0, it'll maintain that same margin on the right-edge of the screen (shortening the fill length). This allows you to create nice dynamic horizontal lines/dividers with margins.
-
- 24 Apr, 2020 1 commit
-
-
rswindell authored
Added multiple Internet email recipient support. I'll look into multiple FidoNet netmail support later as that code needs an even greater overhaul in that process.
-
- 23 Apr, 2020 1 commit
-
-
rswindell authored
- external programs section (default: "xtrn_sec") - logon list (default: "logonlist") This ties the Baja XTRN_SECTION and USERLIST_LOGONS functions and the JS bbs.xtrn_sec() and bbs.list_logons() methods to the loadable modules (if configured) automatically without the exec_bin hackery in *.src. Also, allow the xtrn section argument to be passed to the JS/C++ method to go directly to a specific xtrn program section. The bbs.list_logons() can also accept an argument to pass to the module (e.g. "-y" for yesterday's logons).
-
- 11 Apr, 2020 1 commit
-
-
rswindell authored
together to keep things atomic: 1. Eliminate eprintf() as sbbs_t::lputs() and sbbs_t::lprintf() do the "right thing" (e.g. log to the event log when called from the event_thread). 2. Moved upload_stats() and download_stats() from ftpsrvr.c to getstats.c where I plan to make use of them for JS-based upload/download file support.
-
- 19 Mar, 2020 1 commit
-
-
rswindell authored
(e.g. for the [O]perator->(H)eader dump command from the reading msgs prompt) Looks pretty much the same as before.
-
- 01 Mar, 2020 1 commit
-
-
rswindell authored
now accept an optional print-mode (a.k.a. pmode) argument to provide more control over the printing that happens in these functions/methods. The immediate use is for P_NOCRLF to stop the newline from being printed after a yes or no response (e.g. in a full-screen UI), but there could be other uses.
-
- 03 Jan, 2020 1 commit
-
-
rswindell authored
not set (or blank), use the default ("/sbbs/ctrl") and print a warning to stderr. This resolves a FAQ for sysops that struggle with setting the SBBSCTRL env var, but do have sbbs install in /sbbs or a symlink from /sbbs to where sbbs is actually installed. Note: this function is different than the one previously defined in getctrl.c but never used. If/when we ever really need to support PREFIX, then perhaps we'll use that one (which copies a string to a buffer).
-
- 01 Dec, 2019 1 commit
-
-
rswindell authored
(configured or auto-generated): getsubnewsgroupname().
-
- 24 Oct, 2019 1 commit
-
-
rswindell authored
running a JavaScript module would crash (e.g. segfault) sbbs: Create and use a separate JS runtime, context, and global object/scope for global hotkey events. This means that the hotkey won't benefit from any previously loaded/required scripts, possibly effecting the performance of the first invocation of the hotkey handler. Subsequent JS hotkey events will reuse the same runtime/context/global, so they'll execute fast(er). One questionalbe change to js_execfile(): With the JS_GC (garbage collection) call *before* the JS_ENDREQUEST() call, the process would crash in libmozjs. Moving the JS_GC() call to *after* the JS_ENDREQUEST() resolved this issue and I'm not clear why. This 'js_cx' parameter here is not always sbbs_t::js_cx. When called to handle a JS hotkey event, it's sbbs_t::js_hotkey_cx, so it shouldn't interfere with the sbs_t::js_cx being used by the currently executing JS module (shell or door). <scratches chin>
-