Running an SL/Corrade system is complicated - in fact it being a couple of years since I last did it I've forgotten how it works. So here's what I've rediscovered.
I think there are two ways of controlling using Corrade:
This latter is what I've done.
The Corrade code also picks up any in-world alerts/notifications that the bot receives and sends them down to the LSL script.
The real “gotcha” in all this is that in Corrade Configuration you need to set a password for the Group that the bot and controller are sharing (this password does not exist in SL, it is only for Corrade), and you need to enter this password into your Corrade control script.
Since LSL processing is obviously limited (and even my simple/developed test script had blown the stack/heap) you want to keep this bit to the bare minimum and use ANOTHER web service to link out to your main code running on your own server elsewhere.
So the overall architecture is as below: