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