RaidMax / IW4M-Admin

Complete administration tool for IW4x, Pluto T6, Pluto IW5, Pluto T5, Pluto T4, H1-Mod, CoD4x, IW6x, TeknoMW3, and most Call of Duty® dedicated servers.
MIT License
212 stars 43 forks source link

Support JS ES6 for plugin development #255

Closed vdawg-git closed 2 years ago

vdawg-git commented 2 years ago

It is kinda hard to write es5 code for me, as I have never done that before. And ESLint does not support ECMA 5.1. Using a bundler which converts the code would also not work as the var plugin would probably get changed.

RaidMax commented 2 years ago

I have neither the time nor motivation to create my own JavaScript engine.

As such IW4MAdmin utilizes Jint for JavaScript parsing. You can view the readme of that project to see what is and isn’t supported. I’m using a relatively recent build so it should have the majority of listed features.

You can also view https://github.com/RaidMax/IW4M-Admin/blob/release/pre/Plugins/ScriptPlugins/SubnetBan.js#L1 for additional plugin sample utilizing newer JavaScript syntax.

vdawg-git commented 2 years ago

Understandable and thank you for the info