From 3cfc7722b2fc63c105a81a83e1cceb22bcd4c284 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Mon, 16 Sep 2019 20:52:32 +0000 Subject: [PATCH] Fill in local "stuff" when there's no drop file. --- exec/dorkit/local_console.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/exec/dorkit/local_console.js b/exec/dorkit/local_console.js index 56160bb02e..9abc1b1a03 100644 --- a/exec/dorkit/local_console.js +++ b/exec/dorkit/local_console.js @@ -103,30 +103,40 @@ dk.console.local_io = { }; dk.console.local_io.screen.touched = []; -// TODO -if (false /*js.global.conio !== undefined*/) { - // Get stuff that would come from the dropfile if there was one. - // From the bbs object. +// Get stuff that would come from the dropfile if there was one. +// From the bbs object. +if (dk.connection.node === undefined) dk.connection.node = 0; +if (dk.connection.time === undefined) dk.connection.time = strftime("%H:%M", time()); +if (dk.user.seconds_remaining_from === undefined) dk.user.seconds_remaining_from = time(); +if (dk.user.seconds_remaining === undefined) dk.user.seconds_remaining = 43200; // 12 hours should be enough for anyone! +if (dk.user.minutes_remaining === undefined) dk.user.minutes_remaining = 720; // From the client object... +if (dk.connection.type === undefined) dk.connection.type = 'LOCAL'; // From the console object +if (dk.user.ansi_supported === undefined) dk.user.ansi_supported = true; +if (dk.console.rows === undefined) dk.console.rows = conio.screenheight; +if (dk.console.cols === undefined) dk.console.cols = conio.screenwidth; - delete dk.console.local_screen; +delete dk.console.local_screen; // From the user object... +if (dk.user.alias === undefined) dk.user.alias = 'Local User'; +if (dk.user.full_name === undefined) dk.user.full_name = 'Local User'; +if (dk.user.location === undefined) dk.user.location = 'Local'; +if (dk.user.number === undefined) dk.user.number = 0; - +if (dk.user.alias === undefined) dk.user.alias = 'Sysop'; -} -- GitLab