aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar/Chat
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Environment/Modules/Avatar/Chat
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs10
2 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 1493e32..e1599a8 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -32,7 +32,7 @@ using System.Net.Sockets;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
115 115
116 // chat works by redistributing every incoming chat 116 // chat works by redistributing every incoming chat
117 // message to each avatar in the scene 117 // message to each avatar in the scene
118 LLVector3 pos = new LLVector3(128, 128, 30); 118 Vector3 pos = new Vector3(128, 128, 30);
119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence) 119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence)
120 { 120 {
121 if (presence.IsChildAgent) return; 121 if (presence.IsChildAgent) return;
@@ -129,12 +129,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
129 129
130 if (null == c.SenderObject) 130 if (null == c.SenderObject)
131 client.SendChatMessage(c.Message, (byte)c.Type, 131 client.SendChatMessage(c.Message, (byte)c.Type,
132 pos, c.From, LLUUID.Zero, 132 pos, c.From, UUID.Zero,
133 (byte)ChatSourceType.Agent, 133 (byte)ChatSourceType.Agent,
134 (byte)ChatAudibleLevel.Fully); 134 (byte)ChatAudibleLevel.Fully);
135 else 135 else
136 client.SendChatMessage(c.Message, (byte)c.Type, 136 client.SendChatMessage(c.Message, (byte)c.Type,
137 pos, c.From, LLUUID.Zero, 137 pos, c.From, UUID.Zero,
138 (byte)ChatSourceType.Object, 138 (byte)ChatSourceType.Object,
139 (byte)ChatAudibleLevel.Fully); 139 (byte)ChatAudibleLevel.Fully);
140 }); 140 });
@@ -153,13 +153,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
153 scene = m_scenes[0]; 153 scene = m_scenes[0];
154 154
155 // Filled in since it's easier than rewriting right now. 155 // Filled in since it's easier than rewriting right now.
156 LLVector3 fromPos = e.Position; 156 Vector3 fromPos = e.Position;
157 LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 157 Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
158 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 158 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
159 159
160 string fromName = e.From; 160 string fromName = e.From;
161 string message = e.Message; 161 string message = e.Message;
162 LLUUID fromID = e.SenderUUID; 162 UUID fromID = e.SenderUUID;
163 163
164 if(message.Length >= 1000) // libomv limit 164 if(message.Length >= 1000) // libomv limit
165 message = message.Substring(0, 1000); 165 message = message.Substring(0, 1000);
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
172 if (avatar != null) 172 if (avatar != null)
173 { 173 {
174 fromPos = avatar.AbsolutePosition; 174 fromPos = avatar.AbsolutePosition;
175 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 175 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
176 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 176 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
177 fromName = avatar.Firstname + " " + avatar.Lastname; 177 fromName = avatar.Firstname + " " + avatar.Lastname;
178 fromID = e.Sender.AgentId; 178 fromID = e.Sender.AgentId;
@@ -217,16 +217,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
217 } 217 }
218 } 218 }
219 219
220 private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos, 220 private void TrySendChatMessage(ScenePresence presence, Vector3 fromPos, Vector3 regionPos,
221 LLUUID fromAgentID, string fromName, ChatTypeEnum type, 221 UUID fromAgentID, string fromName, ChatTypeEnum type,
222 string message, ChatSourceType src) 222 string message, ChatSourceType src)
223 { 223 {
224 // don't send stuff to child agents 224 // don't send stuff to child agents
225 if (presence.IsChildAgent) return; 225 if (presence.IsChildAgent) return;
226 226
227 LLVector3 fromRegionPos = fromPos + regionPos; 227 Vector3 fromRegionPos = fromPos + regionPos;
228 LLVector3 toRegionPos = presence.AbsolutePosition + 228 Vector3 toRegionPos = presence.AbsolutePosition +
229 new LLVector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, 229 new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
230 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 230 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
231 231
232 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); 232 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 9df05e0..8fe5080 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -32,7 +32,7 @@ using System.Net.Sockets;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -617,7 +617,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
617 public void ListenerRun() 617 public void ListenerRun()
618 { 618 {
619 string inputLine; 619 string inputLine;
620 LLVector3 pos = new LLVector3(128, 128, 20); 620 Vector3 pos = new Vector3(128, 128, 20);
621 while (m_enabled) 621 while (m_enabled)
622 { 622 {
623 try 623 try
@@ -638,7 +638,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
638 c.Position = pos; 638 c.Position = pos;
639 c.From = data["nick"]; 639 c.From = data["nick"];
640 c.Sender = null; 640 c.Sender = null;
641 c.SenderUUID = LLUUID.Zero; 641 c.SenderUUID = UUID.Zero;
642 642
643 // is message "\001ACTION foo 643 // is message "\001ACTION foo
644 // bar\001"? -> "/me foo bar" 644 // bar\001"? -> "/me foo bar"
@@ -684,9 +684,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
684 c.Message = String.Format(format, args); 684 c.Message = String.Format(format, args);
685 c.Type = ChatTypeEnum.Say; 685 c.Type = ChatTypeEnum.Say;
686 c.Channel = 0; 686 c.Channel = 0;
687 c.Position = new LLVector3(128, 128, 20); 687 c.Position = new Vector3(128, 128, 20);
688 c.Sender = null; 688 c.Sender = null;
689 c.SenderUUID = LLUUID.Zero; 689 c.SenderUUID = UUID.Zero;
690 690
691 foreach (Scene m_scene in m_scenes) 691 foreach (Scene m_scene in m_scenes)
692 { 692 {