Last change
on this file since 323 was 267, checked in by alloc, 9 years ago |
Update Chat stuff to 14.6 b26
|
File size:
725 bytes
|
Line | |
---|
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 | PrivateMessageConnections.SetLastPMSender (_sender, _receiver);
|
---|
11 | senderName = _sender.playerName;
|
---|
12 | } else {
|
---|
13 | senderName = "Server";
|
---|
14 | }
|
---|
15 | _receiver.SendPackage (new NetPackageGameMessage (EnumGameMessages.Chat, _message, senderName + " (PM)", false, "", false));
|
---|
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.