Skip to content

OnRconConnection ​

Usage ​

  • Return a non-null value to override default behavior

Example Autogenerated ​

csharp
private object OnRconConnection( System.Net.IPAddress ClientIpAddress )
{
    Puts( "OnRconConnection works!" );
    return null;
}
csharp
private object OnRconConnection( System.Net.IPAddress Address )
{
    Puts( "OnRconConnection works!" );
    return null;
}

Location ​

  • Facepunch.Rcon.Listener::OnConnection(Fleck.IWebSocketConnection socket)
  • Facepunch.RCon/RConListener::ProcessConnections()
csharp
//---
			Debug.Log($"RCON: CRITICAL - Banned IP {address} supplied the correct password. Access was still denied.");
		}
		socket2.Close();
		return;
	}
	if (Interface.CallHook("OnRconConnection", socket.ConnectionInfo.ClientIpAddress) == null)
	{
		if (!(socket2.ConnectionInfo.Path != text))
		{
			int id = Interlocked.Increment(ref nextClientId);
			string ipString = address.ToString();
//---
csharp
//---
	}
	Socket socket = server.AcceptSocket();
	if (socket != null)
	{
		IPEndPoint iPEndPoint = socket.RemoteEndPoint as IPEndPoint;
		if (Interface.CallHook("OnRconConnection", iPEndPoint.Address) != null)
		{
			socket.Close();
		}
		else if (IsBanned(iPEndPoint.Address))
		{
//---

Released under the MIT License.