diff options
author | Talun | 2012-07-05 23:34:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-06 22:49:18 +0100 |
commit | ae1f2114f5ccb0422536ec73feb2dbf16c2645fd (patch) | |
tree | 20562c3ffd71798e8a53adbcc8028ec85010f9fa /OpenSim/Region/OptionalModules | |
parent | Mantis 6063 osNpcTouch. (diff) | |
download | opensim-SC_OLD-ae1f2114f5ccb0422536ec73feb2dbf16c2645fd.zip opensim-SC_OLD-ae1f2114f5ccb0422536ec73feb2dbf16c2645fd.tar.gz opensim-SC_OLD-ae1f2114f5ccb0422536ec73feb2dbf16c2645fd.tar.bz2 opensim-SC_OLD-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/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 8 |
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; |