Merge branch 'master' of /home/opensim/src/opensim

This commit is contained in:
BlueWall
2011-05-28 16:21:30 -04:00
4 changed files with 106 additions and 11 deletions

View File

@@ -389,6 +389,9 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void RegionUp(GridRegion region);
public event RegionUp OnRegionUp;
public delegate void LoginsEnabled(string regionName);
public event LoginsEnabled OnLoginsEnabled;
public class MoneyTransferArgs : EventArgs
{
public UUID sender;
@@ -2218,5 +2221,26 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
public void TriggerLoginsEnabled (string regionName)
{
LoginsEnabled handler = OnLoginsEnabled;
if ( handler != null)
{
foreach (LoginsEnabled d in handler.GetInvocationList())
{
try
{
d(regionName);
}
catch (Exception e)
{
m_log.ErrorFormat("[EVENT MANAGER]: Delegate for LoginsEnabled failed - continuing {0} - {1}",
e.Message, e.StackTrace);
}
}
}
}
}
}

View File

@@ -1376,9 +1376,12 @@ namespace OpenSim.Region.Framework.Scenes
IConfig startupConfig = m_config.Configs["Startup"];
if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
{
// This handles a case of a region having no scripts for the RegionReady module
if (m_sceneGraph.GetActiveScriptsCount() == 0)
{
// need to be able to tell these have changed in RegionReady
LoginLock = false;
EventManager.TriggerLoginsEnabled(RegionInfo.RegionName);
}
m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
// For RegionReady lockouts