From 99a88bca4608541e5546c8d94324822d0b776676 Mon Sep 17 00:00:00 2001 From: "jazz (gitea)" Date: Wed, 18 Mar 2026 16:16:21 -0500 Subject: [PATCH] message box clears now, + fix server interface not refreshing the bottom line --- main.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.cc b/main.cc index 4c40d17..898842e 100644 --- a/main.cc +++ b/main.cc @@ -97,6 +97,7 @@ main(int argc, char *argv[]) } else if (mode == 1) { writeToFile(logFileName, "SERVER MODE"); setupServer(PORT_NUM); + linePos++; /* No idea why, but this needs to be here. */ } while (!exit) { @@ -107,10 +108,17 @@ main(int argc, char *argv[]) if (linesInFile(logFileName) > LOG_LENGTH) linePos++; + /* clear message box / reset cursor */ move(12, 0); - printw("> "); + printw(">\t\t\t"); + move(12,2); + getstr(userInput); writeToFile(logFileName, userInput); + + if (!strncmp(userInput, "/quit", 5)) + exit = true; + if (mode == 1) send(clientSocketDescriptor, (char *)userInput, strlen(userInput), 0); else