From aea882a8e4552b64c03c521d660b28821b0fa35d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Thu, 10 Apr 2025 17:56:02 -0400
Subject: [PATCH] Initialize Terminal in global sbbs when answering

Should fix issue where extra pauses occur on connection.
---
 src/sbbs3/main.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp
index 259c458594..9f8ea464df 100644
--- a/src/sbbs3/main.cpp
+++ b/src/sbbs3/main.cpp
@@ -5581,6 +5581,13 @@ NO_SSH:
 				}
 			}
 
+			// Initialize term state
+			sbbs->autoterm = 0;
+			if (sbbs->term)
+				delete sbbs->term;
+			sbbs->term = new Terminal(sbbs);
+			sbbs->term->cols = startup->default_term_width;
+
 			sbbs->client_socket = client_socket; // required for output to the user
 			if (!ssh)
 				sbbs->online = ON_REMOTE;
@@ -5673,9 +5680,6 @@ NO_SSH:
 			if (rlogin)
 				sbbs->outcom(0); /* acknowledge RLogin per RFC 1282 */
 
-			sbbs->autoterm = 0;
-			sbbs->term->cols = startup->default_term_width;
-
 			sbbs->bprintf("\r\n%s\r\n", VERSION_NOTICE);
 			sbbs->bprintf("%s connection from: %s\r\n", client.protocol, host_ip);
 
-- 
GitLab