And the avatar services :)
parent
a407ad38f6
commit
1238b27d64
|
@ -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
|
||||
|
||||
|
@ -78,20 +79,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig gridConfig = source.Configs["AvatarService"];
|
||||
if (gridConfig != null)
|
||||
IConfig moduleConfig = source.Configs["Modules"];
|
||||
if (moduleConfig != null)
|
||||
{
|
||||
string serviceUrl = gridConfig.GetString("AvatarServerURI");
|
||||
if (!String.IsNullOrEmpty(serviceUrl))
|
||||
string name = moduleConfig.GetString("AssetServices", "");
|
||||
if (name == Name)
|
||||
{
|
||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||
serviceUrl = serviceUrl + '/';
|
||||
m_serverUrl = serviceUrl;
|
||||
IConfig gridConfig = source.Configs["AvatarService"];
|
||||
if (gridConfig != null)
|
||||
{
|
||||
string serviceUrl = gridConfig.GetString("AvatarServerURI");
|
||||
if (!String.IsNullOrEmpty(serviceUrl))
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(m_serverUrl))
|
||||
m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector");
|
||||
}
|
||||
|
||||
#region IAvatarService
|
||||
|
|
Loading…
Reference in New Issue