A quick update (this is become a blog

):
Today I added bi-directional communication to (and from) the AdminPort. There is no new binary yet which has this feature, as I need someone to validate my work on security, but initial tests works great
From Squirrel you do:
GSAdmin.Send(<Squirrel Table>), for example:
GSAdmin.Send({ param1 = false, param2 = 2, param3 = "param3", param4 = {param4a = 10, param4b = "string"}, param5 = [b, 56] });
This is then received by the connectors on the AdminPort (who registered for GAMESCRIPT) as a JSON string. All modern languages know how to convert a JSON string to their native structure, so you should be fine there.
The other way around works too. On the AdminPort you send a JSON string, and the GS receives:
Code: Select all
switch (e.GetEventType()) {
case GSEvent.ET_ADMIN_PORT:
local ec = GSEventAdminPort.Convert(e);
local data = ec.GetObject();
GSLog.Info("Admin Port:");
foreach (key, value in data) {
GSLog.Info(" " + key + ": " + value);
}
break;
}
to just put it in plain code.
I am sure this will make many many many many people really really really happy, so I do accept kudos

I cannot imagine how this will be used, but I am sure it will be in ways I did not intend

And it will be ... EEEPPPIIICCCCCC
The only thing necessary for the triumph of evil is for good men to do nothing.