Rev | Line | |
---|
[230] | 1 | using System;
|
---|
| 2 |
|
---|
| 3 | namespace 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 | }
|
---|
[238] | 15 | _receiver.SendPackage (new NetPackageGameMessage (_message, senderName + " (PM)"));
|
---|
[230] | 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.