Scripting
The contract, for people who write plugins.
Everything on this page is the real interface, not a summary of it. If you are integrating your own plugin with the licence check, or deciding whether a pack will fit your server, this is the page.
The licence check, in full
Every licensed plugin speaks to the same endpoint. There is no SDK to install and no key embedded in the binary: the key is activated once, and after that the plugin asks for a lease and carries the answer.
| Endpoint | Method | What it does |
|---|---|---|
/v1/activate | POST | Takes a licence key and returns a signed lease for that server. |
/v1/heartbeat | POST | Same exchange, every two minutes. This is how a revoke reaches a running server. |
/v1/amxx/lease | GET | Returns the canonical string and its signature, for a client that wants to verify locally. |
/v1/download-token | POST | Retired. Delivery is by SFTP push; no artefact is downloadable. |
/v1/download/:token | GET | Retired. Returns 410. Nothing is served from this endpoint. |
/v1/health | GET | Liveness, no auth. |
The lease string
Field order is fixed and it is part of the interface. It is signed with HMAC-SHA256 under a key derived per account, so a leaked binary points at one account and no other.
v1|LIC|<licenceId>|<pack>|<accountId>|<epoch>|<iat>|<exp>|<port>|<flags>
The epoch is the whole enforcement model. Stopping, refunding or revoking a licence increments it. A client that sees a higher epoch than the one it holds stops enforcing immediately, and it does not matter that the plugin is still on disk. That is why nothing has to be deleted from a server to end an arrangement.
What each pack needs beyond the base
A module is loaded from modules.ini. A library is linked into the plugin at compile time, and a missing one fails differently: the plugin loads and then goes quiet. The two are listed separately on purpose.
| Name | Kind | Packs that declare it |
|---|---|---|
authemu | library | extras |
curl | module | admin-bans |
easy_http | module | network-suite |
grip | module | admin-bans |
hackdetector | library | extras |
iphubclient | module | admin-bans |
reaimdetector | library | extras |
4 modules and 3 libraries declared across the library. A pack that declares none runs on the base alone.
Per pack, measured
| Pack | Plugins | Core | Optional | Extra requirements |
|---|---|---|---|---|
| Zombie Plague 5 | 91 | 17 | 74 | none beyond the base |
| Extras | 87 | 4 | 83 | authemu hackdetector reaimdetector |
| Network Suite | 82 | 43 | 39 | easy_http |
| Admin and Bans | 26 | 6 | 20 | curl grip iphubclient |
| Server Utilities | 25 | 6 | 19 | none beyond the base |
| CSDM and GunXP | 23 | 2 | 21 | none beyond the base |
| Rank and Stats | 22 | 4 | 18 | none beyond the base |
| VIP and Shop | 16 | 2 | 14 | none beyond the base |
What the analysis found
Across the whole source corpus, not only the shipped packs: 11251 files, 1997 of them unique content, 435 natives, 476 commands and 1280 cvars declared. Those numbers are what a conflict check has to reason about, and they are the reason two random packs cannot be dropped on one server and expected to agree.
The shipped library is 8 packs, 372 plugins and 150 includes, of which 84 plugins are core. The corpus number is larger because it counts every file the analysis ever saw, including packs that were retired.
Bases and addons covers what to install underneath all of this. Help covers what to do when a plugin will not load.