aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorAdam Frisby2007-10-19 23:36:27 +0000
committerAdam Frisby2007-10-19 23:36:27 +0000
commit4f1abe3e76421e0e02df908102db61e45fab8779 (patch)
tree40126369bf651164d3198eae0466e604d13c236c /OpenSim/Region
parent* Cross-border region chat should now work as long as both regions are part o... (diff)
downloadopensim-SC-4f1abe3e76421e0e02df908102db61e45fab8779.zip
opensim-SC-4f1abe3e76421e0e02df908102db61e45fab8779.tar.gz
opensim-SC-4f1abe3e76421e0e02df908102db61e45fab8779.tar.bz2
opensim-SC-4f1abe3e76421e0e02df908102db61e45fab8779.tar.xz
* Whisper, Say and Shout distances are now configurable (what the hell!)
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index b6bbdb7..518454c 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -49,7 +49,11 @@ namespace OpenSim.Region.Environment.Modules
49 private int m_port = 6668; 49 private int m_port = 6668;
50 private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; 50 private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot";
51 private string m_nick = null; 51 private string m_nick = null;
52 private string m_channel = null; 52 private string m_channel = null;
53
54 private int m_whisperdistance = 10;
55 private int m_saydistance = 30;
56 private int m_shoutdistance = 100;
53 57
54 private NetworkStream m_stream; 58 private NetworkStream m_stream;
55 private TcpClient m_irc; 59 private TcpClient m_irc;
@@ -87,6 +91,10 @@ namespace OpenSim.Region.Environment.Modules
87 Console.WriteLine("No IRC config information, skipping IRC bridge configuration"); 91 Console.WriteLine("No IRC config information, skipping IRC bridge configuration");
88 } 92 }
89 93
94 m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance");
95 m_saydistance = config.Configs["Chat"].GetInt("say_distance");
96 m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance");
97
90 if (!m_scenes.Contains(scene)) 98 if (!m_scenes.Contains(scene))
91 { 99 {
92 m_scenes.Add(scene); 100 m_scenes.Add(scene);
@@ -257,7 +265,7 @@ namespace OpenSim.Region.Environment.Modules
257 switch (e.Type) 265 switch (e.Type)
258 { 266 {
259 case ChatTypeEnum.Whisper: 267 case ChatTypeEnum.Whisper:
260 if ((dis < 10) && (dis > -10)) 268 if ((dis < m_whisperdistance) && (dis > -m_whisperdistance))
261 { 269 {
262 //should change so the message is sent through the avatar rather than direct to the ClientView 270 //should change so the message is sent through the avatar rather than direct to the ClientView
263 presence.ControllingClient.SendChatMessage(message, 271 presence.ControllingClient.SendChatMessage(message,
@@ -268,7 +276,7 @@ namespace OpenSim.Region.Environment.Modules
268 } 276 }
269 break; 277 break;
270 case ChatTypeEnum.Say: 278 case ChatTypeEnum.Say:
271 if ((dis < 30) && (dis > -30)) 279 if ((dis < m_saydistance) && (dis > -m_saydistance))
272 { 280 {
273 //Console.WriteLine("sending chat"); 281 //Console.WriteLine("sending chat");
274 presence.ControllingClient.SendChatMessage(message, 282 presence.ControllingClient.SendChatMessage(message,
@@ -279,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules
279 } 287 }
280 break; 288 break;
281 case ChatTypeEnum.Shout: 289 case ChatTypeEnum.Shout:
282 if ((dis < 100) && (dis > -100)) 290 if ((dis < m_shoutdistance) && (dis > -m_shoutdistance))
283 { 291 {
284 presence.ControllingClient.SendChatMessage(message, 292 presence.ControllingClient.SendChatMessage(message,
285 type, 293 type,