mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Adding OnChatBroadcast event logic to EventManager providing
a clean interface for Sim broadcasts. Added SimBroadcast support to ChatModule. Removing all code from IRCBridgeModule dealing with agent/client directly. Cleaning up ChatModule. Polishing IRC messages, adding support for "/me" (both directions).
This commit is contained in:
@@ -217,6 +217,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
public delegate void ChatFromWorldEvent(Object sender, ChatFromViewerArgs chat);
|
||||
public event ChatFromWorldEvent OnChatFromWorld;
|
||||
/// <summary>
|
||||
/// ChatBroadcastEvent is called via Scene when a broadcast chat message
|
||||
/// from world comes in (chat from viewer is available via client.OnChatFromViewer).
|
||||
/// </summary>
|
||||
public delegate void ChatBroadcastEvent(Object sender, ChatFromViewerArgs chat);
|
||||
public event ChatBroadcastEvent OnChatBroadcast;
|
||||
|
||||
public class MoneyTransferArgs : EventArgs
|
||||
{
|
||||
@@ -320,6 +326,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps;
|
||||
private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps;
|
||||
private ChatFromWorldEvent handlerChatFromWorld = null; // OnChatFromWorld;
|
||||
private ChatBroadcastEvent handlerChatBroadcast = null; // OnChatBroadcast;
|
||||
private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
|
||||
private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
|
||||
private ScriptControlEvent handlerScriptControlEvent = null;
|
||||
@@ -699,6 +706,15 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerOnChatBroadcast(Object sender, ChatFromViewerArgs chat)
|
||||
{
|
||||
handlerChatBroadcast = OnChatBroadcast;
|
||||
if (handlerChatBroadcast != null)
|
||||
{
|
||||
handlerChatBroadcast(sender, chat);
|
||||
}
|
||||
}
|
||||
|
||||
internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed)
|
||||
{
|
||||
handlerScriptControlEvent = OnScriptControlEvent;
|
||||
|
||||
Reference in New Issue
Block a user