mirror of
https://github.com/EndPwnArchive/endpwn3.2-lambda.git
synced 2024-08-14 23:49:56 +00:00
remove compat functions, add updated settingsapi
This commit is contained in:
parent
ae26be7772
commit
6ea8342f94
3 changed files with 9 additions and 11 deletions
|
@ -150,13 +150,10 @@ function evaluate(str, exportsR) {
|
|||
}
|
||||
|
||||
// krequire is a reimplementation of require(), only intended for loading plugins
|
||||
/*window.krequire = function (p) {
|
||||
window.krequire = function (p) {
|
||||
var exports = {};
|
||||
evaluate(fs.readFileSync($api.data + '/plugins/' + p + (p.endsWith('.js') ? '' : '.js'), 'utf8').toString(), exports);
|
||||
return exports;
|
||||
}*/
|
||||
window.krequire = function(p){
|
||||
return require($api.data + '/plugins/' + p + (p.endsWith('.js') ? '' : '.js')); //200 IQ :bigthink:
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -675,7 +672,8 @@ https://discord.gg/8k3gEeE`,
|
|||
return callback(r);
|
||||
}
|
||||
catch (e) {
|
||||
internal.error(e, 'A function wrapper threw an exception');
|
||||
let err = internal && internal.error ? internal.error : console.error;
|
||||
err(e, 'A function wrapper threw an exception');
|
||||
|
||||
// again, dont fuck stuff up if there's a flaw in the wrapper
|
||||
return r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue