Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

iar_mods
Justin Clark-Casey (justincc) 2012-01-04 21:41:28 +00:00
commit 7e6c84c334
2 changed files with 25 additions and 0 deletions

View File

@ -401,6 +401,9 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void RegionUp(GridRegion region);
public event RegionUp OnRegionUp;
public delegate void RegionStarted(Scene scene);
public event RegionStarted OnRegionStarted;
public delegate void LoginsEnabled(string regionName);
public event LoginsEnabled OnLoginsEnabled;
@ -2243,6 +2246,27 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void TriggerOnRegionStarted(Scene scene)
{
RegionStarted handler = OnRegionStarted;
if (handler != null)
{
foreach (RegionStarted d in handler.GetInvocationList())
{
try
{
d(scene);
}
catch (Exception e)
{
m_log.ErrorFormat("[EVENT MANAGER]: Delegate for RegionStarted failed - continuing {0} - {1}",
e.Message, e.StackTrace);
}
}
}
}
public void TriggerLoginsEnabled (string regionName)
{
LoginsEnabled handler = OnLoginsEnabled;

View File

@ -1194,6 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes
try
{
m_eventManager.TriggerOnRegionStarted(this);
while (!shuttingdown)
Update();