/
/
/
session.c
Amendments on October 1, 2022
This also helps at shutdown to know when we can no longer log.
jcs made amendment
261
about 1 year ago
Amendments on September 21, 2022
Prune after 21 days of logs by default, every morning. The db was
getting quite large and each new login or recent call check was
taking a long time.
We're stable now so we don't have to persist the call log tally to
disk, just keep it in memory.
jcs made amendment
255
about 1 year ago
Amendments on September 15, 2022
These letter->function assignments really need to be made dynamic
so main menu changes don't require source code changes.
jcs made amendment
251
about 1 year ago
Amendments on September 14, 2022
Track the highest MOTD id each user has seen and only show it on
login if the current one is higher than the user's highest seen.
Also, in migrations, we can't iterate through users while modifying
each one, because the order will change as we save and write a new
user in the map.
jcs made amendment
250
about 1 year ago
During telnet negotiation, many lines are logged in quick succession
which means we spend a lot of time updating the log TextEdit. Just
buffer these logs and spit them out all at once upon login or
disconnection, so the user's login prompt is immediately responsive.
Rename session_log to session_logf while I'm in here, to reflect that
it's a format-string function.
jcs made amendment
245
about 1 year ago
Amendments on August 13, 2022
This way modem users and telnet users with weird clients that don't
negotiate TTYPE will get prompted for vt100 compatibility.
jcs made amendment
243
about 1 year ago
Amendments on August 3, 2022
jcs made amendment
235
about 1 year ago
Amendments on July 31, 2022
jcs made amendment
226
about 1 year ago
Amendments on July 21, 2022
Instead of free(ptr), use xfree(&ptr) and after it calls
DisposePtr(ptr), it will update ptr to point at NULL to catch
use-after-frees.
When MALLOC_DEBUG is defined, each allocation is added to a
list, and removed when freed. If it's not in the list at free
time, it's a double-free. Also, instead of pointing pointers at
NULL, point them to a pre-defined block of zeroes and in the
idle loop, periodically check that this block is still zero. This
will also catch use-after-frees in a more reliable (but costly)
way.
jcs made amendment
220
about 1 year ago
Amendments on July 19, 2022
All remaining uses of session_output_template can use session_printf
which still does {{B}} and {{/B}} parsing.
Change session_output_view to session_output_view_or_printf to make it
easier to print a view and fallback to a string, rather than having to
check the result of session_output_view everywhere.
jcs made amendment
218
about 1 year ago
Amendments on July 16, 2022
Limit sessions to the number of uthreads we can handle, and then
reserve 1 session for the console.
In telnet, allocate one extra node so we can print a message to the
client that we have no free nodes, and then disconnect. Add a view
for this to make it editable.
In console, handle getting a null session back from session_create.
jcs made amendment
211
about 1 year ago
This is only used in chat and only to print a left-aligned bar.
jcs made amendment
210
about 1 year ago
Amendments on July 15, 2022
jcs made amendment
207
about 1 year ago
Amendments on July 12, 2022
Make session_menu a bit more helpful and hide options with a null key
set, don't repeat "Invalid option" more than once
Add session_get_char for file transfers
jcs made amendment
191
about 1 year ago
Amendments on June 30, 2022
jcs made amendment
179
about 1 year ago
Amendments on June 24, 2022
jcs made amendment
174
about 1 year ago
Amendments on June 23, 2022
jcs made amendment
172
about 1 year ago
jcs made amendment
169
about 1 year ago
Amendments on June 22, 2022
When a telnet connection comes from the configured proxy IP, allow the
REMOTE_ADDR environment variable passed to be used as the connection's
IP. Also don't auto-ban connections from the proxy.
Request TSPEED and store it as the session's terminal speed, just for
showing up in 'who' output.
Automatically unban IPs after 30 minutes by tracking the ban time.
jcs made amendment
166
about 1 year ago
jcs made amendment
164
about 1 year ago