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

Clear mouse hotspots when executing *any* external program/script

Previously, we only cleared hotspots when executing any external from the
external program section (doors menu). This means that invoking a script or
external program (e.g. via JS bbs.exec()) from anywhere else, any current
mouse hotspots would remain active. Disable those.

This fixes issue #758
parent 5cdc58ba
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6428 passed
......@@ -385,6 +385,8 @@ int sbbs_t::external(const char* cmdline, int mode, const char* startup_dir)
return -1;
}
clear_hotspots();
XTRN_LOADABLE_MODULE(cmdline,startup_dir);
XTRN_LOADABLE_JS_MODULE(cmdline,mode,startup_dir);
......@@ -1144,6 +1146,8 @@ int sbbs_t::external(const char* cmdline, int mode, const char* startup_dir)
xtrn_mode = mode;
lprintf(LOG_DEBUG, "Executing external: %s", cmdline);
clear_hotspots();
if(startup_dir==NULL)
startup_dir=nulstr;
......
......@@ -1438,7 +1438,6 @@ bool sbbs_t::exec_xtrn(uint xtrnnum, bool user_event)
snprintf(str, sizeof(str), "%u\t%s", useron.number, useron.alias);
mqtt_pub_timestamped_msg(mqtt, TOPIC_BBS_ACTION, topic, start, str);
clear_hotspots();
external(cmdstr(cfg.xtrn[xtrnnum]->cmd, drop_file, startup_dir, NULL, mode)
,mode
,cfg.xtrn[xtrnnum]->path);
......@@ -1447,7 +1446,6 @@ bool sbbs_t::exec_xtrn(uint xtrnnum, bool user_event)
if(cfg.xtrn[xtrnnum]->misc&FREETIME)
starttime+=end-start;
if(cfg.xtrn[xtrnnum]->clean[0]) {
clear_hotspots();
external(cmdstr(cfg.xtrn[xtrnnum]->clean, drop_file, startup_dir, NULL, mode)
,mode&~(EX_STDIN|EX_CONIO), cfg.xtrn[xtrnnum]->path);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment