node-insim
Version:
An InSim library for NodeJS with TypeScript support
31 lines (30 loc) • 960 B
TypeScript
import { SendablePacket } from './base';
import { PacketType } from './enums';
import type { PacketData } from './types';
/**
* IP Bans
*
* You can set up to 120 IP addresses that are not allowed to join a host
*/
export declare class IS_IPB extends SendablePacket {
static readonly MAX_BANS = 120;
/** 8 + NumB * 4 */
Size: number;
readonly Type = PacketType.ISP_IPB;
/** 0 unless this is a reply to a {@link TINY_IPB} request */
ReqI: number;
/** Number of bans in this packet */
NumB: number;
readonly Sp0 = 0;
readonly Sp1 = 0;
readonly Sp2 = 0;
readonly Sp3 = 0;
/** IP addresses, 0 to {@link MAX_BANS} ({@link NumB}) */
BanIPs: string[];
private readonly banIPsOffset;
private readonly banIPSize;
constructor(data?: IS_IPB_Data);
unpack(buffer: Uint8Array<ArrayBuffer>): this;
pack(): Uint8Array<ArrayBuffer>;
}
export type IS_IPB_Data = Pick<PacketData<IS_IPB>, 'BanIPs'>;