mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Adding an event to signal that logins are enabled
Added an event to signal the eabling of logins and added an alert to send to a configured service.
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user