mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
trim chat messages
This commit is contained in:
parent
4db2437dfc
commit
2f47dbf5d7
2 changed files with 5 additions and 0 deletions
|
@ -105,6 +105,8 @@ namespace SanAndreasUnity.Chat
|
|||
if (!NetStatus.IsServerStarted)
|
||||
return;
|
||||
|
||||
msg = msg.Trim();
|
||||
|
||||
foreach (var player in Player.AllPlayers) {
|
||||
SendChatMessageToPlayer ( player, msg, sender );
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace SanAndreasUnity.Chat
|
|||
|
||||
Player p = m_player;
|
||||
|
||||
msg = msg.Trim();
|
||||
|
||||
// Remove tags.
|
||||
msg = msg.Replace ("<", ""); // the only easy way :D
|
||||
|
@ -51,6 +52,8 @@ namespace SanAndreasUnity.Chat
|
|||
return;
|
||||
}
|
||||
|
||||
msg = msg.Trim();
|
||||
|
||||
onChatMessageReceivedOnLocalPlayer (new ChatMessage (msg, sender));
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue