InspIRCd  3.0
Classes | Public Member Functions | List of all members
WhoWas::Manager Class Reference


struct  Stats

Public Member Functions

void Add (User *user)
Stats GetStats () const
void Maintain ()
void UpdateConfig (unsigned int NewGroupSize, unsigned int NewMaxGroups, unsigned int NewMaxKeep)
const NickFindNick (const std::string &nick) const
bool IsEnabled () const
 Manager ()
 ~Manager ()

Constructor & Destructor Documentation

◆ Manager()

WhoWas::Manager::Manager ( )


◆ ~Manager()

WhoWas::Manager::~Manager ( )


Member Function Documentation

◆ Add()

void WhoWas::Manager::Add ( User user)

Add a user to the whowas database. Called when a user quits.

userThe user to add to the database

◆ FindNick()

const Nick* WhoWas::Manager::FindNick ( const std::string &  nick) const

Retrieves all data known about a given nick

nickNickname to find, case insensitive (IRC casemapping)
A pointer to a WhoWas::Nick if the nick was found, NULL otherwise

◆ GetStats()

Stats WhoWas::Manager::GetStats ( ) const

Retrieves statistics about the whowas database

Whowas statistics as a WhoWas::Manager::Stats struct

◆ IsEnabled()

bool WhoWas::Manager::IsEnabled ( ) const

Returns true if WHOWAS is enabled according to the current configuration

True if WHOWAS is enabled according to the configuration, false if WHOWAS is disabled

◆ Maintain()

void WhoWas::Manager::Maintain ( )

Expires old entries

◆ UpdateConfig()

void WhoWas::Manager::UpdateConfig ( unsigned int  NewGroupSize,
unsigned int  NewMaxGroups,
unsigned int  NewMaxKeep 

Updates the current configuration which may result in the database being pruned if the new values are lower than the current ones.

NewGroupSizeMaximum number of nicks allowed in the database. In case there are this many nicks in the database and one more is added, the oldest one is removed (FIFO).
NewMaxGroupsMaximum number of entries per nick
NewMaxKeepSeconds how long each nick should be kept

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