public void AddRegion(Scene scene)
{
lock (m_scenes)
m_scenes.Add (scene);
if (m_enabled) {
m_log.Info ("[FreeMoney] Found Scene.");
scene.RegisterModuleInterface<IMoneyModule> (this);
IHttpServer httpServer = MainServer.Instance;
lock (m_scenel)
{
if (m_scenel.Count == 0)
{
// XMLRPCHandler = scene;
// To use the following you need to add:
// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER>
// to the command line parameters you use to start up your client
// This commonly looks like -helperuri http://127.0.0.1:9000/
// Local Server.. enables functionality only.
httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func);
httpServer.AddXmlRPCHandler("buyCurrency", buy_func);
httpServer.AddXmlRPCHandler ("preflightBuyLandPrep", preflightBuyLandPrep_func);
httpServer.AddXmlRPCHandler ("buyLandPrep", landBuy_func);
}
if (m_scenel.ContainsKey (scene.RegionInfo.RegionHandle))
{
m_scenel[scene.RegionInfo.RegionHandle] = scene;
}
else
{
m_scenel.Add (scene.RegionInfo.RegionHandle, scene);
}
}
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnMakeRootAgent += MakeRootAgent;
scene.EventManager.OnMoneyTransfer += OnMoneyTransfer;
scene.EventManager.OnValidateLandBuy += ValidateLandBuy;
scene.EventManager.OnLandBuy += processLandBuy;
}
}