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.0.7.4.1
parent
1b1f841c6a
commit
ae1f2114f5
|
@ -192,6 +192,14 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
|
|
||||||
private void SendOnChatFromClient(int channel, string message, ChatTypeEnum chatType)
|
private void SendOnChatFromClient(int channel, string message, ChatTypeEnum chatType)
|
||||||
{
|
{
|
||||||
|
if (channel == 0)
|
||||||
|
{
|
||||||
|
message = message.Trim();
|
||||||
|
if (string.IsNullOrEmpty(message))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
OSChatMessage chatFromClient = new OSChatMessage();
|
OSChatMessage chatFromClient = new OSChatMessage();
|
||||||
chatFromClient.Channel = channel;
|
chatFromClient.Channel = channel;
|
||||||
chatFromClient.From = Name;
|
chatFromClient.From = Name;
|
||||||
|
|
Loading…
Reference in New Issue