This commit is contained in:
y4my4my4m 2023-05-13 15:44:03 +09:00
parent 84b0296754
commit 1e68c497f2
2 changed files with 32 additions and 27 deletions

View file

@ -1,6 +1,4 @@
 
..... .. s ..... .. s
 .H8888888h. ~-. x .d88" :8  .H8888888h. ~-. x .d88" :8
 888888888888x `> 5888R u. u. .88  888888888888x `> 5888R u. u. .88
@ -22,3 +20,4 @@
| `-' | \ ' \ ' '--| || | | | \ ' '--| || | | | | `-' | \ ' \ ' '--| || | | | \ ' '--| || | | |
`---'.-' / .-' / `--'`--`--`--'.-' / `--'`--`--`--' `---'.-' / .-' / `--'`--`--`--'.-' / `--'`--`--`--'
`---' `---' `---' `---' `---' `---'

View file

@ -712,30 +712,34 @@ U0 Telnet(U8 *host=NULL, U16 port=TELNET_PORT) {
Fs); Fs);
DocClear; DocClear;
if (host == NULL) { // SplashScreen
term.buffer_len = LoadSplashScreen("Art/TelnetSplash.ans"); term.buffer_len = LoadSplashScreen("Art/TelnetSplash.ans");
if (term.buffer_len > 0) { if (term.buffer_len > 0) {
term.buffer[term.buffer_len] = '\0'; term.buffer[term.buffer_len] = '\0';
// parse the buffer // parse the buffer
ANSIParse; ANSIParse;
try
{
while (host == NULL) {
CHostForm form;
TelnetPrompt(&form);
host = form.host;
port = form.port;
DocClear;
break;
}
}
catch
PutExcept;
}
else {
"Error: Could not load splash screen.\n";
}
} }
else {
"Error: Could not load splash screen.\n";
}
// PopUp if no host is specified
if (host == NULL) {
try
{
while (host == NULL) {
CHostForm form;
TelnetPrompt(&form);
host = form.host;
port = form.port;
DocClear;
break;
}
}
catch
PutExcept;
}
// Spawn a task to receive data from the socket // Spawn a task to receive data from the socket
term.task = Spawn(&TerminalTask, NULL, "Telnet"); term.task = Spawn(&TerminalTask, NULL, "Telnet");
@ -751,6 +755,8 @@ U0 Telnet(U8 *host=NULL, U16 port=TELNET_PORT) {
term.sock_ready = 1; // Signal that the socket is ready term.sock_ready = 1; // Signal that the socket is ready
"$$BG,GREEN$$$$WHITE$$Connected$$FG$$$$BG$$\n"; "$$BG,GREEN$$$$WHITE$$Connected$$FG$$$$BG$$\n";
Sleep(1000);
DocClear;
try try
{ {
@ -824,5 +830,5 @@ U0 Telnet(U8 *host=NULL, U16 port=TELNET_PORT) {
// dev server // dev server
// Telnet("localhost", 8888); Telnet("localhost", 8888);
Telnet; // Telnet;