AmendHub

jcs

/

subtext

/

amendments

/

chat.c

Amendments on April 10, 2023

session+chat: Finally implement sysop paging/answering

jcs made amendment 477 about 1 year ago

Amendments on March 13, 2023

chat: Reduce max input size

With all the ANSI we have to put around it, it was growing to exceed
chat_final_pbuf
jcs made amendment 399 about 1 year ago

Amendments on March 8, 2023

chat: Remove unused variables

jcs made amendment 371 about 1 year ago

Amendments on February 5, 2023

*: Minor fixes found by cppcheck and scan-build

Mostly unused variables
jcs made amendment 300 about 1 year ago

Amendments on November 29, 2022

chat: Fix session iteration

nsessions is the current number of logged-in sessions, but sessions
is a fixed array so we must go to MAX_SESSIONS to visit each slot.
jcs made amendment 293 about 1 year ago

Amendments on November 19, 2022

chat: Implement private messaging

Assign each guest their own unique chat username so it's not so
confusing if multiple guests are chatting.
jcs made amendment 290 about 1 year ago

Amendments on September 27, 2022


Amendments on August 14, 2022

logger: Add buffered logging, support logging without updating window

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

chat: Previous change to drawing reverse bar isn't widely compatible

Go back to padding it with spaces.
jcs made amendment 244 about 1 year ago

Amendments on July 21, 2022

*: Use NewPtr instead of malloc, add malloc and free debugging

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 16, 2022

session+chat: Remove session_bar, implement simpler bar in chat

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

chat: Use session_output instead of printf when printing a bar

These can be big and trigger an overflow panic in the printf buffer
jcs made amendment 208 about 1 year ago

Amendments on June 23, 2022

chat: Log when users join and leave, implement /who

Also implement a placeholder for /msg since it needs to be done
jcs made amendment 170 about 1 year ago

Amendments on June 22, 2022

chat: Minor spacing nit

jcs made amendment 165 about 1 year ago

Amendments on June 13, 2022

session: Remove session_output_string, enforce login timeout

jcs made amendment 142 about 1 year ago

Amendments on May 20, 2022

session_field_input: Add multiline support

Remove session_multiline_input since session_field_input just gets a
multiline flag. Also support backspacing at the beginning of a line
to jump back up to the end of the previous line.
jcs made amendment 103 over 2 years ago

Amendments on February 17, 2022

chat: When sending input, put cursor on col 1 and reset

Not sure when this broke, but probably should investigate
jcs made amendment 75 over 2 years ago

Amendments on January 29, 2022


Amendments on January 2, 2022

chat: Only output to a user if their output buffer can handle it

We can't directly output to another user's session from
chat_printf_line because it may call uthread_yield, which won't do
anything since it's interrupting the sender's thread. If the user's
output buffer can't handle the data, just kick them out of chat for
being too lagged.
jcs made amendment 43 over 2 years ago

Amendments on December 31, 2021

*: Lots of unrelated changes lost to repo corruption :(

session: Better handle autologin, look like it's actually logging in
main: Handle GoAway, stop using WaitNextEvent
ansi: Terminate calls to ansi() with ANSI_END instead of NULL
chat: Implement /help and /quit
console: Lots of speed improvements
*: Standarize on "column" and "line"
session: Various bugfixes, mark ending sessions and check everywhere
console: Fix attr resetting in redraw, fixes one-char bold items
session: Support specific-width varible expansion in session_load_view
jcs made amendment 39 over 2 years ago