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.
This commit is contained in:
Talun
2012-07-05 23:34:23 +01:00
committed by Justin Clark-Casey (justincc)
parent 1b1f841c6a
commit ae1f2114f5

View File

@@ -192,6 +192,14 @@ namespace OpenSim.Region.OptionalModules.World.NPC
private void SendOnChatFromClient(int channel, string message, ChatTypeEnum chatType)
{
if (channel == 0)
{
message = message.Trim();
if (string.IsNullOrEmpty(message))
{
return;
}
}
OSChatMessage chatFromClient = new OSChatMessage();
chatFromClient.Channel = channel;
chatFromClient.From = Name;