private void ProcessConnections() { if (!this.server.Pending()) { return; } Socket socket = this.server.AcceptSocket(); if (socket == null) { return; } IPEndPoint remoteEndPoint = socket.RemoteEndPoint as IPEndPoint; if (Interface.CallHook("OnRconConnection", remoteEndPoint) != null) { socket.Close(); return; } if (!RCon.IsBanned(remoteEndPoint.Address)) { this.clients.Add(new RCon.RConClient(socket)); return; } Debug.Log(string.Concat("[RCON] Ignoring connection - banned. ", remoteEndPoint.Address.ToString())); socket.Close(); }
private void ProcessConnections() { if (!this.server.Pending()) { return; } Socket cl = this.server.AcceptSocket(); if (cl == null) { return; } IPEndPoint remoteEndPoint = cl.RemoteEndPoint as IPEndPoint; if (Interface.CallHook("OnRconConnection", (object)remoteEndPoint) != null) { cl.Close(); } else if (RCon.IsBanned(remoteEndPoint.Address)) { Debug.Log((object)("[RCON] Ignoring connection - banned. " + remoteEndPoint.Address.ToString())); cl.Close(); } else { this.clients.Add(new RCon.RConClient(cl)); } }