mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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:
committed by
Justin Clark-Casey (justincc)
parent
1b1f841c6a
commit
ae1f2114f5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user