Class PreAuthenticatingEventArgs
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
userIdstringipAddressstringexpirationlongflagsCentralAuthPreauthFlagscountrystringsignaturebyte[]requestConnectionRequestreaderStartPositionint
Properties
Country
Gets the player's country.
public string Country { get; }
Property Value
Expiration
Gets the request's expiration.
public long Expiration { get; }
Property Value
Flags
Gets the flags.
public CentralAuthPreauthFlags Flags { get; }
Property Value
- CentralAuthPreauthFlags
IpAddress
Gets the player's IP address.
public string IpAddress { get; }
Property Value
IsAllowed
Gets a value indicating whether the player can be authenticated.
public bool IsAllowed { get; }
Property Value
ReaderStartPosition
Gets the reader starting position for reading the preauth.
public int ReaderStartPosition { get; }
Property Value
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
Methods
Delay(byte, bool)
Delays the connection.
public void Delay(byte seconds, bool isForced)
Parameters
secondsbyteThe delay in seconds.
isForcedboolIndicates 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
portushortThe new server port.
isForcedboolIndicates 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
writerNetDataWriterThe LiteNetLib.Utils.NetDataWriter instance.
isForcedboolIndicates 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
rejectionReasonRejectionReasonThe rejection reason.
isForcedboolIndicates whether the player has to be rejected forcefully.
customReasonstringThe custom rejection reason (Banned and Custom reasons only).
expirationlongThe ban expiration ticks (Banned reason only).
secondsbyteThe delay in seconds (Delay reason only).
portushortThe redirection port (Redirect reason only).
Reject(string, bool)
Rejects a player who's trying to authenticate.
public void Reject(string rejectionReason, bool isForced)
Parameters
rejectionReasonstringThe custom rejection reason.
isForcedboolIndicates 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
banReasonstringThe ban reason.
expirationDateTimeThe ban expiration time.
isForcedboolIndicates 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)