RhostMUSH / trunk

RhostMUSH 4.0: This is the official main repository of RhostMUSH. Visit us at rhostdev.mushpark.com 4201
23 stars 21 forks source link

Lua scripting #168

Closed stevensmedia closed 1 year ago

stevensmedia commented 2 years ago

This needs LOTS And LOTS of testing.

Samples of use:

curl -X GET -H "X-Lua64: $(echo return 2+2 | base64)" --user "#222:MyPass" http://localhost:4202

Returns 4

If #2 is an object with an attribute called friends, and the API object can see auser named Web at #3:

 curl -X GET -H "X-Lua64: $(echo 'return json.encode({name = rhost.get(2, "friends"), dbref = rhost.strfunc("pmatch", "Web")})' | base64)" --user "#222:MyPass" http://localhost:4202

Returns {"name":"Matthew Mark Luke John Ringo","dbref":"#3"}

Chalice commented 2 years ago

In Progress! :)

Chalice commented 1 year ago

Forgot to close this! It's been in for a while.