mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Merge branch 'master' of /home/opensim/src/opensim
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user