Ignore:
Timestamp:
Sep 3, 2018, 7:11:10 PM (6 years ago)
Author:
alloc
Message:

A17 compatibility changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs

    r276 r324  
    66                private const string ANSWER = "     [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]";
    77
    8                 public static bool Hook (ClientInfo _cInfo, EnumGameMessages _type, string _message, string _playerName) {
    9                         if (_type == EnumGameMessages.Chat && !string.IsNullOrEmpty (_message)) {
    10                                 if (_message.ToLower () == "/alloc") {
     8                public static bool Hook (ClientInfo _cInfo, EChatType _type, string _message, string _playerName) {
     9                        if (!string.IsNullOrEmpty (_message)) {
     10                                if (_message.EqualsCaseInsensitive ("/alloc")) {
    1111                                        if (_cInfo != null) {
    1212                                                Log.Out ("Sent chat hook reply to {0}", _cInfo.playerId);
    13                                                 _cInfo.SendPackage (new NetPackageGameMessage (EnumGameMessages.Chat, ANSWER, "", false, "", false));
    14                                                 GameManager.Instance.GameMessageServer (_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "", false);
     13                                                _cInfo.SendPackage (new NetPackageChat(EChatType.Whisper, -1, ANSWER, "", false, null));
    1514                                        } else {
    1615                                                Log.Error ("ChatHookExample: Argument _cInfo null on message: {0}", _message);
Note: See TracChangeset for help on using the changeset viewer.