From 24e15088ea796afec01a197c6812c1c52e2de324 Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Fri, 25 Jul 2008 10:05:50 +0000
Subject: renaming the increasingly ill-named ChatFromViewerArgs to
OSChatMessage
---
OpenSim/Framework/ChatFromViewerArgs.cs | 4 ++--
OpenSim/Framework/IClientAPI.cs | 4 ++--
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 10 +++++-----
.../Environment/Modules/Avatar/Chat/ChatModule.cs | 4 ++--
.../Modules/Avatar/Chat/IRCBridgeModule.cs | 6 +++---
.../Modules/Scripting/WorldComm/WorldCommModule.cs | 2 +-
.../Environment/Modules/World/NPC/NPCAvatar.cs | 4 ++--
OpenSim/Region/Environment/Scenes/EventManager.cs | 8 ++++----
.../Environment/Scenes/Scene.PacketHandlers.cs | 20 ++++++++++++--------
.../Region/Examples/SimpleModule/MyNpcCharacter.cs | 4 ++--
10 files changed, 35 insertions(+), 31 deletions(-)
diff --git a/OpenSim/Framework/ChatFromViewerArgs.cs b/OpenSim/Framework/ChatFromViewerArgs.cs
index fb4bb94..15113ed 100644
--- a/OpenSim/Framework/ChatFromViewerArgs.cs
+++ b/OpenSim/Framework/ChatFromViewerArgs.cs
@@ -12,7 +12,7 @@ namespace OpenSim.Framework
///
/// ChatFromViewer Arguments
///
- public class ChatFromViewerArgs : EventArgs, IEventArgs
+ public class OSChatMessage : EventArgs, IEventArgs
{
protected int m_channel;
protected string m_from;
@@ -25,7 +25,7 @@ namespace OpenSim.Framework
protected ChatTypeEnum m_type;
protected LLUUID m_fromID;
- public ChatFromViewerArgs()
+ public OSChatMessage()
{
m_position = new LLVector3();
}
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 742b211..d659a1f 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
public delegate void ViewerEffectEventHandler(IClientAPI sender, List args);
- public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e);
+ public delegate void ChatMessage(Object sender, OSChatMessage e);
public delegate void TextureRequest(Object sender, TextureRequestArgs e);
@@ -347,7 +347,7 @@ namespace OpenSim.Framework
// [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
event ImprovedInstantMessage OnInstantMessage;
// [Obsolete("LLClientView Specific - Replace with more bare-bones arguments. Rename OnChat.")]
- event ChatFromViewer OnChatFromViewer;
+ event ChatMessage OnChatFromViewer;
// [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
event TextureRequest OnRequestTexture;
// [Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 0c420b4..b9a00c0 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -122,8 +122,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private RequestAvatarProperties handlerRequestAvatarProperties = null; //OnRequestAvatarProperties;
private UpdateAvatarProperties handlerUpdateAvatarProperties = null; // OnUpdateAvatarProperties;
- private ChatFromViewer handlerChatFromViewer = null; //OnChatFromViewer;
- private ChatFromViewer handlerChatFromViewer2 = null; //OnChatFromViewer;
+ private ChatMessage handlerChatFromViewer = null; //OnChatFromViewer;
+ private ChatMessage handlerChatFromViewer2 = null; //OnChatFromViewer;
private ImprovedInstantMessage handlerInstantMessage = null; //OnInstantMessage;
private FriendActionDelegate handlerApproveFriendRequest = null; //OnApproveFriendRequest;
private FriendshipTermination handlerTerminateFriendship = null; //OnTerminateFriendship;
@@ -770,7 +770,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event Action OnConnectionClosed;
public event ViewerEffectEventHandler OnViewerEffect;
public event ImprovedInstantMessage OnInstantMessage;
- public event ChatFromViewer OnChatFromViewer;
+ public event ChatMessage OnChatFromViewer;
public event TextureRequest OnRequestTexture;
public event RezObject OnRezObject;
public event GenericCall4 OnDeRezObject;
@@ -3859,7 +3859,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (OnChatFromViewer != null)
{
- ChatFromViewerArgs args = new ChatFromViewerArgs();
+ OSChatMessage args = new OSChatMessage();
args.Channel = channel;
args.From = fromName;
args.Message = Helpers.FieldToUTF8String(message);
@@ -3898,7 +3898,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
byte[] msg = rdialog.Data.ButtonLabel;
if (OnChatFromViewer != null)
{
- ChatFromViewerArgs args = new ChatFromViewerArgs();
+ OSChatMessage args = new OSChatMessage();
args.Channel = ch;
args.From = String.Empty;
args.Message = Helpers.FieldToUTF8String(msg);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 5414322..0e397d6 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
#endregion
#region ISimChat Members
- public void SimBroadcast(Object sender, ChatFromViewerArgs c)
+ public void SimBroadcast(Object sender, OSChatMessage c)
{
// We only want to relay stuff on channel 0 and on the debug channel
if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return;
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
});
}
- public void SimChat(Object sender, ChatFromViewerArgs e)
+ public void SimChat(Object sender, OSChatMessage e)
{
// early return if not on public or debug channel
if (e.Channel != 0 && e.Channel != DEBUG_CHANNEL) return;
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index aa1d80c..9df05e0 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
#region ISimChat Members
- public void SimChat(Object sender, ChatFromViewerArgs e)
+ public void SimChat(Object sender, OSChatMessage e)
{
// We only want to relay stuff on channel 0
if (e.Channel != 0) return;
@@ -631,7 +631,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
// Any chat ???
if (data != null)
{
- ChatFromViewerArgs c = new ChatFromViewerArgs();
+ OSChatMessage c = new OSChatMessage();
c.Message = data["msg"];
c.Type = ChatTypeEnum.Say;
c.Channel = 0;
@@ -679,7 +679,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
{
try
{
- ChatFromViewerArgs c = new ChatFromViewerArgs();
+ OSChatMessage c = new OSChatMessage();
c.From = sender;
c.Message = String.Format(format, args);
c.Type = ChatTypeEnum.Say;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
index 4afbdc4..2f67dee 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
*
* *****************************************************************/
- private void DeliverClientMessage(Object sender, ChatFromViewerArgs e)
+ private void DeliverClientMessage(Object sender, OSChatMessage e)
{
DeliverMessage(e.Type,
e.Channel,
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 2ae4ae0..d84283b 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
private void SendOnChatFromViewer(string message, ChatTypeEnum chatType)
{
- ChatFromViewerArgs chatFromViewer = new ChatFromViewerArgs();
+ OSChatMessage chatFromViewer = new OSChatMessage();
chatFromViewer.Channel = 0;
chatFromViewer.From = Name;
chatFromViewer.Message = message;
@@ -155,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
public event Action OnConnectionClosed;
public event ImprovedInstantMessage OnInstantMessage;
- public event ChatFromViewer OnChatFromViewer;
+ public event ChatMessage OnChatFromViewer;
public event TextureRequest OnRequestTexture;
public event RezObject OnRezObject;
public event ModifyTerrain OnModifyTerrain;
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs
index f3af0d1..2b1adee 100644
--- a/OpenSim/Region/Environment/Scenes/EventManager.cs
+++ b/OpenSim/Region/Environment/Scenes/EventManager.cs
@@ -235,13 +235,13 @@ namespace OpenSim.Region.Environment.Scenes
/// from world comes in (chat from viewer is available via
/// client.OnChatFromViewer).
///
- public delegate void ChatFromWorldEvent(Object sender, ChatFromViewerArgs chat);
+ public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat);
public event ChatFromWorldEvent OnChatFromWorld;
///
/// ChatBroadcastEvent is called via Scene when a broadcast chat message
/// from world comes in (chat from viewer is available via client.OnChatFromViewer).
///
- public delegate void ChatBroadcastEvent(Object sender, ChatFromViewerArgs chat);
+ public delegate void ChatBroadcastEvent(Object sender, OSChatMessage chat);
public event ChatBroadcastEvent OnChatBroadcast;
public delegate float SunLindenHour();
@@ -760,7 +760,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public void TriggerOnChatFromWorld(Object sender, ChatFromViewerArgs chat)
+ public void TriggerOnChatFromWorld(Object sender, OSChatMessage chat)
{
handlerChatFromWorld = OnChatFromWorld;
if (handlerChatFromWorld != null)
@@ -769,7 +769,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public void TriggerOnChatBroadcast(Object sender, ChatFromViewerArgs chat)
+ public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat)
{
handlerChatBroadcast = OnChatBroadcast;
if (handlerChatBroadcast != null)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 177d99c..db05430 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Environment.Scenes
protected void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
LLUUID fromID, bool fromAgent, bool broadcast)
{
- ChatFromViewerArgs args = new ChatFromViewerArgs();
+ OSChatMessage args = new OSChatMessage();
args.Message = Helpers.FieldToUTF8String(message);
args.Channel = channel;
@@ -113,7 +113,8 @@ namespace OpenSim.Region.Environment.Scenes
((SceneObjectGroup) ent).GetProperties(remoteClient);
((SceneObjectGroup) ent).IsSelected = true;
// A prim is only tainted if it's allowed to be edited by the person clicking it.
- if (ExternalChecks.ExternalChecksCanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId) || ExternalChecks.ExternalChecksCanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
+ if (ExternalChecks.ExternalChecksCanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
+ || ExternalChecks.ExternalChecksCanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
{
EventManager.TriggerParcelPrimCountTainted();
}
@@ -156,7 +157,8 @@ namespace OpenSim.Region.Environment.Scenes
{
((SceneObjectGroup) ent).IsSelected = false;
((SceneObjectGroup)ent).ScheduleGroupForFullUpdate();
- if (ExternalChecks.ExternalChecksCanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId) || ExternalChecks.ExternalChecksCanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
+ if (ExternalChecks.ExternalChecksCanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
+ || ExternalChecks.ExternalChecksCanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
{
EventManager.TriggerParcelPrimCountTainted();
break;
@@ -166,10 +168,11 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public virtual void ProcessMoneyTransferRequest(LLUUID source, LLUUID destination, int amount, int transactiontype, string description)
+ public virtual void ProcessMoneyTransferRequest(LLUUID source, LLUUID destination, int amount,
+ int transactiontype, string description)
{
- EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(
- source, destination, amount, transactiontype, description);
+ EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount,
+ transactiontype, description);
EventManager.TriggerMoneyTransfer(this, args);
}
@@ -177,8 +180,9 @@ namespace OpenSim.Region.Environment.Scenes
public virtual void ProcessParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned,
bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
{
- EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(
- agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated);
+ EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned,
+ removeContribution, parcelLocalID, parcelArea,
+ parcelPrice, authenticated);
// First, allow all validators a stab at it
m_eventManager.TriggerValidateLandBuy(this, args);
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index f0442ac..ce4cd62 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Examples.SimpleModule
public event Action OnConnectionClosed;
public event ImprovedInstantMessage OnInstantMessage;
- public event ChatFromViewer OnChatFromViewer;
+ public event ChatMessage OnChatFromViewer;
public event TextureRequest OnRequestTexture;
public event RezObject OnRezObject;
public event ModifyTerrain OnModifyTerrain;
@@ -668,7 +668,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
if (OnChatFromViewer != null)
{
- ChatFromViewerArgs args = new ChatFromViewerArgs();
+ OSChatMessage args = new OSChatMessage();
args.Message = "Hey You! Get out of my Home. This is my Region";
args.Channel = 0;
args.From = FirstName + " " + LastName;
--
cgit v1.1