mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 00:07:15 +00:00
don't use server nick when echoing command
This commit is contained in:
parent
26b51b99c9
commit
1a9fe1754d
2 changed files with 4 additions and 4 deletions
|
@ -41,11 +41,11 @@ namespace SanAndreasUnity.Chat
|
|||
}
|
||||
|
||||
// send command back to player
|
||||
ChatManager.SendChatMessageToPlayer(player, chatMessage);
|
||||
ChatManager.SendChatMessageToPlayer(player, chatMessage, false);
|
||||
|
||||
// send response back to player
|
||||
if (!string.IsNullOrWhiteSpace(response))
|
||||
ChatManager.SendChatMessageToPlayer(player, response);
|
||||
ChatManager.SendChatMessageToPlayer(player, response, true);
|
||||
|
||||
// discard chat message
|
||||
return new ChatPreprocessorResult {shouldBeDiscarded = true};
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace SanAndreasUnity.Chat
|
|||
}
|
||||
|
||||
/// <summary> Use only on server. </summary>
|
||||
public static void SendChatMessageToPlayer( Player player, string msg ) {
|
||||
public static void SendChatMessageToPlayer( Player player, string msg, bool useServerNick ) {
|
||||
|
||||
NetStatus.ThrowIfNotOnServer();
|
||||
|
||||
|
@ -185,7 +185,7 @@ namespace SanAndreasUnity.Chat
|
|||
if (string.IsNullOrEmpty(msg))
|
||||
return;
|
||||
|
||||
SendChatMessageToPlayer (player, msg, singleton.serverChatNick);
|
||||
SendChatMessageToPlayer (player, msg, useServerNick ? singleton.serverChatNick : "");
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue