source: binary-improvements/AllocsCommands/Chat.cs@ 233

Last change on this file since 233 was 230, checked in by alloc, 10 years ago

Binary improvements

File size: 710 bytes
Line 
1using System;
2
3namespace AllocsFixes.CustomCommands
4{
5 public class Chat {
6
7 public static void SendMessage (ClientInfo _receiver, ClientInfo _sender, string _message) {
8 string senderName;
9 if (_sender != null) {
10 PrivateMassageConnections.SetLastPMSender (_sender, _receiver);
11 senderName = _sender.playerName;
12 } else {
13 senderName = "Server";
14 }
15 _receiver.netConnection [0].AddToSendQueue (new NetPackage_GameInfoMessage (_message, senderName + " (PM)"));
16 string receiverName = _receiver.playerName;
17 SdtdConsole.Instance.Output ("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + senderName + "\"");
18 }
19
20
21 }
22}
23
Note: See TracBrowser for help on using the repository browser.