Skip to content

OnRconConnection

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnRconConnection( IPAddress ClientIpAddress )
{
    Puts( "OnRconConnection works!" );
}
csharp
private void OnRconConnection( IPAddress Address )
{
    Puts( "OnRconConnection works!" );
}

Location

  • Facepunch.Rcon.Listener/<>c__DisplayClass10_0::<Start>b__0(Fleck.IWebSocketConnection socket)
  • Facepunch.RCon/RConListener::ProcessConnections()
csharp
internal void <Start>b__0(IWebSocketConnection socket)
{
	Listener.<>c__DisplayClass10_1 <>c__DisplayClass10_ = new Listener.<>c__DisplayClass10_1();
	<>c__DisplayClass10_.CS$<>8__locals1 = this;
	<>c__DisplayClass10_.socket = socket;
	if (Interface.CallHook("OnRconConnection", socket.ConnectionInfo.ClientIpAddress) != null)
	{
		return;
	}
	if (<>c__DisplayClass10_.socket.ConnectionInfo.Path != this.requiredPath)
	{
//---
csharp
//---
	if (socket == null)
	{
		return;
	}
	IPEndPoint iPEndPoint = socket.RemoteEndPoint as IPEndPoint;
	if (Interface.CallHook("OnRconConnection", iPEndPoint.Address) != null)
	{
		return;
	}
	if (RCon.IsBanned(iPEndPoint.Address))
	{
//---

Released under the MIT License.