aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Interfaces/IWorldComm.cs3
-rw-r--r--OpenSim/Region/Environment/Modules/WorldCommModule.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs4
3 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs b/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
index 27b5466..d8811c6 100644
--- a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
+++ b/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework;
30using OpenSim.Region.Environment.Modules; 31using OpenSim.Region.Environment.Modules;
31 32
32namespace OpenSim.Region.Environment.Interfaces 33namespace OpenSim.Region.Environment.Interfaces
@@ -34,7 +35,7 @@ namespace OpenSim.Region.Environment.Interfaces
34 public interface IWorldComm 35 public interface IWorldComm
35 { 36 {
36 int Listen(uint LocalID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg); 37 int Listen(uint LocalID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg);
37 void DeliverMessage(string sourceItemID, int type, int channel, string name, string msg); 38 void DeliverMessage(string sourceItemID, ChatTypeEnum type, int channel, string name, string msg);
38 bool HasMessages(); 39 bool HasMessages();
39 ListenerInfo GetNextMessage(); 40 ListenerInfo GetNextMessage();
40 void ListenControl(int handle, int active); 41 void ListenControl(int handle, int active);
diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs
index 7a631d7..a31b484 100644
--- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Environment.Modules
113 private void DeliverClientMessage(Object sender, ChatFromViewerArgs e) 113 private void DeliverClientMessage(Object sender, ChatFromViewerArgs e)
114 { 114 {
115 DeliverMessage(e.Sender.AgentId.ToString(), 115 DeliverMessage(e.Sender.AgentId.ToString(),
116 (int) e.Type, e.Channel, 116 e.Type, e.Channel,
117 e.Sender.FirstName + " " + e.Sender.LastName, 117 e.Sender.FirstName + " " + e.Sender.LastName,
118 e.Message); 118 e.Message);
119 } 119 }
@@ -140,8 +140,8 @@ namespace OpenSim.Region.Environment.Modules
140 // and if so if this message fits the filter. If it does, then 140 // and if so if this message fits the filter. If it does, then
141 // enqueue the message for delivery to the objects listen event handler. 141 // enqueue the message for delivery to the objects listen event handler.
142 // Objects that do an llSay have their messages delivered here, and for 142 // Objects that do an llSay have their messages delivered here, and for
143 // nearby avatards, the SimChat function is used. 143 // nearby avatars, the SimChat function is used.
144 public void DeliverMessage(string sourceItemID, int type, int channel, string name, string msg) 144 public void DeliverMessage(string sourceItemID, ChatTypeEnum type, int channel, string name, string msg)
145 { 145 {
146 SceneObjectPart source = null; 146 SceneObjectPart source = null;
147 ScenePresence avatar = null; 147 ScenePresence avatar = null;
@@ -177,7 +177,7 @@ namespace OpenSim.Region.Environment.Modules
177 177
178 switch (type) 178 switch (type)
179 { 179 {
180 case 0: // Whisper 180 case ChatTypeEnum.Whisper:
181 181
182 if ((dis < 10) && (dis > -10)) 182 if ((dis < 10) && (dis > -10))
183 { 183 {
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Environment.Modules
191 } 191 }
192 break; 192 break;
193 193
194 case 1: // Say 194 case ChatTypeEnum.Say:
195 195
196 if ((dis < 30) && (dis > -30)) 196 if ((dis < 30) && (dis > -30))
197 { 197 {
@@ -205,7 +205,7 @@ namespace OpenSim.Region.Environment.Modules
205 } 205 }
206 break; 206 break;
207 207
208 case 2: // Shout 208 case ChatTypeEnum.Shout:
209 if ((dis < 100) && (dis > -100)) 209 if ((dis < 100) && (dis > -100))
210 { 210 {
211 ListenerInfo isListener = m_listenerManager.IsListenerMatch( 211 ListenerInfo isListener = m_listenerManager.IsListenerMatch(
@@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Modules
218 } 218 }
219 break; 219 break;
220 220
221 case 0xff: // Broadcast 221 case ChatTypeEnum.Broadcast:
222 ListenerInfo isListen = 222 ListenerInfo isListen =
223 m_listenerManager.IsListenerMatch(sourceItemID, eb, channel, name, msg); 223 m_listenerManager.IsListenerMatch(sourceItemID, eb, channel, name, msg);
224 if (isListen != null) 224 if (isListen != null)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index a9f6991..a57041b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Environment.Scenes
65 /// <param name="fromPos"></param> 65 /// <param name="fromPos"></param>
66 /// <param name="fromName"></param> 66 /// <param name="fromName"></param>
67 /// <param name="fromAgentID"></param> 67 /// <param name="fromAgentID"></param>
68 public void SimChat(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName, 68 public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
69 LLUUID fromAgentID) 69 LLUUID fromAgentID)
70 { 70 {
71 if (m_simChatModule != null) 71 if (m_simChatModule != null)
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
74 74
75 args.Message = Util.FieldToString(message); 75 args.Message = Util.FieldToString(message);
76 args.Channel = channel; 76 args.Channel = channel;
77 args.Type = (ChatTypeEnum) type; 77 args.Type = type;
78 args.Position = fromPos; 78 args.Position = fromPos;
79 79
80 ScenePresence user = GetScenePresence(fromAgentID); 80 ScenePresence user = GetScenePresence(fromAgentID);