InspIRCd  3.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | 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


class TestSuite

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). This length is set in compliance with TS6 protocol, and really should not be changed. Ever. It allows for a lot of clients as-is. – w00t.

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