- Timestamp:
- Sep 4, 2018, 2:33:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs
r325 r326 5 5 6 6 public static bool Hook (ClientInfo _cInfo, EChatType _type, string _message, string _playerName) { 7 if (!string.IsNullOrEmpty (_message)) { 8 if (_message.EqualsCaseInsensitive ("/alloc")) { 9 if (_cInfo != null) { 10 Log.Out ("Sent chat hook reply to {0}", _cInfo.playerId); 11 _cInfo.SendPackage (new NetPackageChat (EChatType.Whisper, -1, ANSWER, "", false, null)); 12 } else { 13 Log.Error ("ChatHookExample: Argument _cInfo null on message: {0}", _message); 14 } 15 16 return false; 17 } 7 if (string.IsNullOrEmpty (_message) || !_message.EqualsCaseInsensitive ("/alloc")) { 8 return true; 18 9 } 19 10 20 return true; 11 if (_cInfo != null) { 12 Log.Out ("Sent chat hook reply to {0}", _cInfo.playerId); 13 _cInfo.SendPackage (new NetPackageChat (EChatType.Whisper, -1, ANSWER, "", false, null)); 14 } else { 15 Log.Error ("ChatHookExample: Argument _cInfo null on message: {0}", _message); 16 } 17 18 return false; 19 21 20 } 22 21 }
Note:
See TracChangeset
for help on using the changeset viewer.