- Timestamp:
- Sep 3, 2018, 7:11:10 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs
r276 r324 6 6 private const string ANSWER = " [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]"; 7 7 8 public static bool Hook (ClientInfo _cInfo, E numGameMessages_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")) { 11 11 if (_cInfo != null) { 12 12 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)); 15 14 } else { 16 15 Log.Error ("ChatHookExample: Argument _cInfo null on message: {0}", _message);
Note:
See TracChangeset
for help on using the changeset viewer.