Skip to content
Snippets Groups Projects
Commit 0d281709 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Rename sbbs_t::ungetstr() and JS console.ungetstr() to ungetkeys()

... since these methods only feed the keyboard buffer.

Add an optional 'insert' argument to console.ungetkeys() - default is false
(append).

Add a new version of console.ungetstr() which feeds the passed characters
directly to the receive input buffer. Now returns bool indicating success.
Existing scripts (if any) that use console.ungetstr() should continue to work
just fine.

This is anticipation of telgate.js being able to stuff strings (e.g. username,
password) into the input buffer and those chars/keys being passed to the
remote (gatewayed) telnet server. Since the telnet gateway reads directly from
the receive input buffer (ignoring the keyboard buffer), we needed a way to
stuff strings of characters into the receive input buffer directly and that
sort of exposed the weirdness of the existing console.ungetstr() method:
- it didn't return a return value (not indication of failure)
- it didn't support an 'insert' operation (even though the underlying C++
  method does)
- it didn't use the sbbs_t method that already existed for feedding a string
  of characters into the input/keyboard buffer
parent d5516d0f
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6544 failed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment