aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTalun2012-07-05 23:34:23 +0100
committerJustin Clark-Casey (justincc)2012-07-06 22:49:18 +0100
commitae1f2114f5ccb0422536ec73feb2dbf16c2645fd (patch)
tree20562c3ffd71798e8a53adbcc8028ec85010f9fa /OpenSim/Region
parentMantis 6063 osNpcTouch. (diff)
downloadopensim-SC-ae1f2114f5ccb0422536ec73feb2dbf16c2645fd.zip
opensim-SC-ae1f2114f5ccb0422536ec73feb2dbf16c2645fd.tar.gz
opensim-SC-ae1f2114f5ccb0422536ec73feb2dbf16c2645fd.tar.bz2
opensim-SC-ae1f2114f5ccb0422536ec73feb2dbf16c2645fd.tar.xz
Mantis 6077 trim NPC chat on channel zero.
This patch trims leading and trailing spaces from NPC chat and suppresses the sending of empty chat strings on open chat channel 0.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 43a09ec..9b3400d 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -192,6 +192,14 @@ namespace OpenSim.Region.OptionalModules.World.NPC
192 192
193 private void SendOnChatFromClient(int channel, string message, ChatTypeEnum chatType) 193 private void SendOnChatFromClient(int channel, string message, ChatTypeEnum chatType)
194 { 194 {
195 if (channel == 0)
196 {
197 message = message.Trim();
198 if (string.IsNullOrEmpty(message))
199 {
200 return;
201 }
202 }
195 OSChatMessage chatFromClient = new OSChatMessage(); 203 OSChatMessage chatFromClient = new OSChatMessage();
196 chatFromClient.Channel = channel; 204 chatFromClient.Channel = channel;
197 chatFromClient.From = Name; 205 chatFromClient.From = Name;