Skip to content
Snippets Groups Projects
Commit c0c1565d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Check the node "interrupt flag" every 10 seconds

Since this script isn't normally calling bbs.nodesync() (e.g. to display
any pending inter-node messages/telegrams), we have to check the NODE_INTR
flag manually. Calling bbs.nodesync() directly here to get a more immediate
notice and disconnection message sent to the user.

This check is necessary so that a sysop or the event thread can gracefully
terminate/disconnect a user that's running this script (e.g. when an
exclusive timed event is scheduled to run and thus being prevented to run).
This should help Keyop's reported issue with his weekly msgmaint timed event
having to ungracefully disconnect his user session because he's running this
script.
parent 6044f840
No related branches found
No related tags found
No related merge requests found
......@@ -476,7 +476,16 @@ function main() {
}
var cmd, line, user_input;
var lastnodechk = time();
while (!js.terminated && !break_loop) {
if ((time() - lastnodechk) >= 10) {
// Check the node "interrupt flag" once every 10 seconds
if (system.node_list[bbs.node_num - 1].misc & NODE_INTR) {
bbs.nodesync(); // this will display a message to to the user and disconnect
break;
}
lastnodechk = time();
}
session.cycle();
if (input_state == 'chat') {
frames.divider.gotoxy(frames.divider.width - 16, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment