InspIRCd  3.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
UIDGenerator Class Reference

Public Member Functions

void init (const std::string &sid)
std::string GetUID ()

Static Public Member Functions

static std::string GenerateSID (const std::string &servername, const std::string &serverdesc)

Static Public Attributes

static const unsigned int UUID_LENGTH = 9

Member Function Documentation

◆ GenerateSID()

std::string UIDGenerator::GenerateSID ( const std::string &  servername,
const std::string &  serverdesc 

Generates a pseudorandom SID based on a servername and a description Guaranteed to return the same if invoked with the same parameters

servernameThe server name to use as seed
serverdescThe server description to use as seed
A valid SID

◆ GetUID()

std::string UIDGenerator::GetUID ( )

Returns the next available UID for this server.

◆ init()

void UIDGenerator::init ( const std::string &  sid)

Initializes this UID generator with the given SID

sidSID that conforms to InspIRCd::IsSID()

Member Data Documentation


const unsigned int UIDGenerator::UUID_LENGTH = 9

This is the maximum length of a UUID (unique user identifier). It allows up to 12,960 servers and 2,176,782,336 users per server.

The documentation for this class was generated from the following files: