mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 22:10:17 +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)
|
if (!NetStatus.IsServerStarted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
msg = msg.Trim();
|
||||||
|
|
||||||
foreach (var player in Player.AllPlayers) {
|
foreach (var player in Player.AllPlayers) {
|
||||||
SendChatMessageToPlayer ( player, msg, sender );
|
SendChatMessageToPlayer ( player, msg, sender );
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace SanAndreasUnity.Chat
|
||||||
|
|
||||||
Player p = m_player;
|
Player p = m_player;
|
||||||
|
|
||||||
|
msg = msg.Trim();
|
||||||
|
|
||||||
// Remove tags.
|
// Remove tags.
|
||||||
msg = msg.Replace ("<", ""); // the only easy way :D
|
msg = msg.Replace ("<", ""); // the only easy way :D
|
||||||
|
@ -51,6 +52,8 @@ namespace SanAndreasUnity.Chat
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msg = msg.Trim();
|
||||||
|
|
||||||
onChatMessageReceivedOnLocalPlayer (new ChatMessage (msg, sender));
|
onChatMessageReceivedOnLocalPlayer (new ChatMessage (msg, sender));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue