And the avatar services :)

viewer-2-initial-appearance
Melanie 2010-09-05 17:53:15 +01:00
parent a407ad38f6
commit 1238b27d64
1 changed files with 22 additions and 12 deletions

View File

@ -56,6 +56,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
// private static string ZeroID = UUID.Zero.ToString();
private string m_serverUrl = String.Empty;
private bool m_Enabled = false;
#region ISharedRegionModule
@ -66,8 +67,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
public SimianAvatarServiceConnector() { }
public string Name { get { return "SimianAvatarServiceConnector"; } }
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAvatarService>(this); } }
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAvatarService>(this); } }
public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAvatarService>(this); } }
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAvatarService>(this); } }
#endregion ISharedRegionModule
@ -77,6 +78,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
}
public void Initialise(IConfigSource source)
{
IConfig moduleConfig = source.Configs["Modules"];
if (moduleConfig != null)
{
string name = moduleConfig.GetString("AssetServices", "");
if (name == Name)
{
IConfig gridConfig = source.Configs["AvatarService"];
if (gridConfig != null)
@ -87,12 +94,15 @@ namespace OpenSim.Services.Connectors.SimianGrid
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
serviceUrl = serviceUrl + '/';
m_serverUrl = serviceUrl;
m_Enabled = true;
}
}
if (String.IsNullOrEmpty(m_serverUrl))
m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector");
}
}
}
#region IAvatarService