JS - Utility Functions
disconnect #
Terminates the connection with the user. Script will not continue after this function.
- Arguments: None
- Returns: None
exec #
Execute another script from the scripts directory.
- Arguments:
- String: The filename of the script (without the extension)
- Returns: None
getdoors #
Returns an array of objects describing all doors on the system.
- Arguments: None
- Returns:
- Array: An array of door objects.
Example:
[
{
"key": "SOMEKEY",
"name": "Some Door",
"category": "Games"
},
{
"key": "SOMEOTHERKEY",
"name": "Another door",
"category": "Utils"
}
]
getversion #
Returns an object describing the versions of related parts of the system.
- Arguments: None
- Returns:
- Object: Version desciption
Example:
{
"envy": "0.1-a6787f",
"system": "Linux",
"sysver": "6.11.2",
"machine": "x86_64",
"duktape": "2.4.0"
}
opname #
Returns the sysop's username as entered into envy.ini
- Arguments: None
- Returns:
- String: The Sysop's username
rundoor #
Runs a door corresponding to the specified key.
- Arguments:
- String: The key of the door to run
- Returns: None