using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; namespace RageCoop.Server.Scripting { public class ChatEventArgs : EventArgs { public Client Sender { get; set; } public string Message { get; set; } } public class CustomEventReceivedArgs : EventArgs { public Client Sender { get; set; } public int Hash { get; set; } public List Args { get; set; } } public class OnCommandEventArgs : EventArgs { public Client Sender { get; set; } public string Name { get; set; } public string[] Args { get; set; } /// /// If this value was set to true, corresponding handler registered with will not be invoked. /// public bool Cancel { get; set; } = false; } public class HandshakeEventArgs : EventArgs { public int ID { get; set; } public string Username { get; set; } /// /// The client password hashed with SHA256 algorithm. /// public string PasswordHash { get; set; } public IPEndPoint EndPoint { get; set; } public void Deny(string reason) { DenyReason=reason; Cancel=true; } internal string DenyReason { get; set; } internal bool Cancel { get; set; }=false; } }