- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs
r324 r325 1 using System; 2 3 namespace AllocsFixes 4 { 1 namespace AllocsFixes { 5 2 public class ChatHookExample { 6 private const string ANSWER = " [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]"; 3 private const string ANSWER = 4 " [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]"; 7 5 8 6 public static bool Hook (ClientInfo _cInfo, EChatType _type, string _message, string _playerName) { … … 11 9 if (_cInfo != null) { 12 10 Log.Out ("Sent chat hook reply to {0}", _cInfo.playerId); 13 _cInfo.SendPackage (new NetPackageChat (EChatType.Whisper, -1, ANSWER, "", false, null));11 _cInfo.SendPackage (new NetPackageChat (EChatType.Whisper, -1, ANSWER, "", false, null)); 14 12 } else { 15 13 Log.Error ("ChatHookExample: Argument _cInfo null on message: {0}", _message); 16 14 } 15 17 16 return false; 18 17 } … … 21 20 return true; 22 21 } 23 24 22 } 25 23 }
Note:
See TracChangeset
for help on using the changeset viewer.