Last change
on this file since 331 was 325, checked in by alloc, 6 years ago |
Code style cleanup (mostly whitespace changes, enforcing braces, using cleanup)
|
File size:
774 bytes
|
Rev | Line | |
---|
[325] | 1 | namespace AllocsFixes.CustomCommands {
|
---|
[230] | 2 | public class Chat {
|
---|
| 3 | public static void SendMessage (ClientInfo _receiver, ClientInfo _sender, string _message) {
|
---|
| 4 | string senderName;
|
---|
| 5 | if (_sender != null) {
|
---|
[251] | 6 | PrivateMessageConnections.SetLastPMSender (_sender, _receiver);
|
---|
[230] | 7 | senderName = _sender.playerName;
|
---|
| 8 | } else {
|
---|
| 9 | senderName = "Server";
|
---|
| 10 | }
|
---|
[325] | 11 |
|
---|
| 12 | _receiver.SendPackage (new NetPackageGameMessage (EnumGameMessages.Chat, _message, senderName + " (PM)",
|
---|
| 13 | false, "", false));
|
---|
[230] | 14 | string receiverName = _receiver.playerName;
|
---|
[325] | 15 | SdtdConsole.Instance.Output ("Message to player " +
|
---|
| 16 | (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") +
|
---|
| 17 | " sent with sender \"" + senderName + "\"");
|
---|
[230] | 18 | }
|
---|
| 19 | }
|
---|
[325] | 20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.