message box clears now, + fix server interface not refreshing the bottom line

This commit is contained in:
2026-03-18 16:16:21 -05:00
parent 3810db7ac8
commit 99a88bca46

10
main.cc
View File

@@ -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