Table of Contents

Class PreAuthenticatingEventArgs

Namespace
Exiled.Events.EventArgs.Player
Assembly
Exiled.Events.dll

Contains all information before pre-authenticating a player.

public class PreAuthenticatingEventArgs : IExiledEvent
Inheritance
PreAuthenticatingEventArgs
Implements
Inherited Members
Extension Methods

Constructors

PreAuthenticatingEventArgs(string, string, long, CentralAuthPreauthFlags, string, byte[], ConnectionRequest, int)

Initializes a new instance of the PreAuthenticatingEventArgs class.

public PreAuthenticatingEventArgs(string userId, string ipAddress, long expiration, CentralAuthPreauthFlags flags, string country, byte[] signature, ConnectionRequest request, int readerStartPosition)

Parameters

userId string
ipAddress string
expiration long
flags CentralAuthPreauthFlags
country string
signature byte[]
request ConnectionRequest
readerStartPosition int

Properties

Country

Gets the player's country.

public string Country { get; }

Property Value

string

Expiration

Gets the request's expiration.

public long Expiration { get; }

Property Value

long

Flags

Gets the flags.

public CentralAuthPreauthFlags Flags { get; }

Property Value

CentralAuthPreauthFlags

IpAddress

Gets the player's IP address.

public string IpAddress { get; }

Property Value

string

IsAllowed

Gets a value indicating whether the player can be authenticated.

public bool IsAllowed { get; }

Property Value

bool

ReaderStartPosition

Gets the reader starting position for reading the preauth.

public int ReaderStartPosition { get; }

Property Value

int

Request

Gets the connection request.

public ConnectionRequest Request { get; }

Property Value

ConnectionRequest

Signature

Gets the request's signature.

public byte[] Signature { get; }

Property Value

byte[]

UserId

Gets the player's user id.

public string UserId { get; }

Property Value

string

Methods

Delay(byte, bool)

Delays the connection.

public void Delay(byte seconds, bool isForced)

Parameters

seconds byte

The delay in seconds.

isForced bool

Indicates whether the player has to be rejected forcefully.

ForceReject()

Rejects a player who's trying to authenticate.

public void ForceReject()

Redirect(ushort, bool)

Rejects the player and redirects them to another server port.

public void Redirect(ushort port, bool isForced)

Parameters

port ushort

The new server port.

isForced bool

Indicates whether the player has to be rejected forcefully.

Reject(NetDataWriter, bool)

Rejects a player who's trying to authenticate.

public void Reject(NetDataWriter writer, bool isForced)

Parameters

writer NetDataWriter

The LiteNetLib.Utils.NetDataWriter instance.

isForced bool

Indicates whether the player has to be rejected forcefully.

Reject(RejectionReason, bool, string, long, byte, ushort)

Rejects a player who's trying to authenticate.

public void Reject(RejectionReason rejectionReason, bool isForced, string customReason = null, long expiration = 0, byte seconds = 0, ushort port = 0)

Parameters

rejectionReason RejectionReason

The rejection reason.

isForced bool

Indicates whether the player has to be rejected forcefully.

customReason string

The custom rejection reason (Banned and Custom reasons only).

expiration long

The ban expiration ticks (Banned reason only).

seconds byte

The delay in seconds (Delay reason only).

port ushort

The redirection port (Redirect reason only).

Reject(string, bool)

Rejects a player who's trying to authenticate.

public void Reject(string rejectionReason, bool isForced)

Parameters

rejectionReason string

The custom rejection reason.

isForced bool

Indicates whether the player has to be rejected forcefully.

RejectBanned(string, DateTime, bool)

Rejects a player who's trying to authenticate.

public void RejectBanned(string banReason, DateTime expiration, bool isForced)

Parameters

banReason string

The ban reason.

expiration DateTime

The ban expiration time.

isForced bool

Indicates whether the player has to be rejected forcefully.

RejectBanned(string, long, bool)

Rejects a player who's trying to authenticate.

public void RejectBanned(string banReason, long expiration, bool isForced)

Parameters

banReason string

The ban reason.

expiration long

The ban expiration time in .NET Ticks.

isForced bool

Indicates whether the player has to be rejected forcefully.