public Kick(SocketHandler.SocketConnection connection, User admin, string reason) { Kicked = connection.User; Admin = admin; Reason = reason; IPAddresses = new List <string>() { connection.IPAddress }; }
public static Kick GetKick(SocketHandler.SocketConnection connection) { foreach (var kick in PriorKickedUsers) { if (kick.Match(connection)) { return(kick); } } return(null); }
public bool Match(SocketHandler.SocketConnection user) { if (!Program.Options.Perm_Block_Kicked_Users) { return(false); } if (user.User.AccountName == Kicked.AccountName) { if (!IPAddresses.Contains(user.IPAddress)) { IPAddresses.Add(user.IPAddress); } return(true); } foreach (var ip in IPAddresses) { if (ip == user.IPAddress || ip == user.IPEnd.Address.ToString()) { return(true); } } return(false); }
public AdminMessage(SocketHandler.SocketConnection connection, string content) : this(connection.User.AccountName, connection.Authentication, content) { }