On Mon May 23 11:49:00 2022, Digital Man wrote to Apam <=-
load(), require() and js.exec() are used to execute a JS file from a JS file.
On Mon May 23 11:49:00 2022, Digital Man wrote to Apam <=-
load(), require() and js.exec() are used to execute a JS file from a JS file.
I think I need to use js.exec.apply() so I can pass the query argument.. but can't seem to find any information on it..
I see it's used in install-xtrn
var result = js.exec.apply(null
,[js_file, item.startup_dir, {}].concat(js_args));
but unsure what that first null is.
js.exec() is a function, so: https://developer.mozilla.org/en-US/docs/Web/JavaS
|15n|03ola|15g|03eek |10<|02phenom|10>|07
|12C|04APiT0L |12S|04HRiLL|07
Re: Couple of JS Questions
By: Digital Man to Apam on Mon May 23 2022 10:00 pm
I'm working on a mod to turn on a light when I have active nodes - however sometimes the light will stay on after someone logs off, even when no one else is logged in - but there is a active connection by a bot, scanner, or network call of some kind. I'm currently using server.clients to get this number but it's leaving the light on (and not in a good Motel 6 kind of way)
Is there a better way to get the number of actual nodes with a user actually logged in?
Sysop: | Benjgaminknox |
---|---|
Location: | Knoxville, TN |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 214:20:11 |
Calls: | 625 |
Messages: | 29,393 |