InspIRCd  4.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ChannelManager Class Reference

#include <channelmanager.h>

Public Member Functions

ChannelFind (const std::string &channel) const
 
ChannelMap & GetChans ()
 
const ChannelMap & GetChans () const
 
bool IsPrefix (unsigned char prefix) const
 

Static Public Member Functions

static bool DefaultIsChannel (const std::string &channel)
 

Public Attributes

std::function< bool(const std::string &)> IsChannel = DefaultIsChannel
 

Detailed Description

Manages state relating to channels.

Member Function Documentation

◆ DefaultIsChannel()

bool ChannelManager::DefaultIsChannel ( const std::string &  channel)
static

Determines whether a channel name is valid according to the RFC 1459 rules. This is the default function for InspIRCd::IsChannel.

Parameters
channelThe channel name to validate.
Returns
True if the channel name is valid according to RFC 1459 rules; otherwise, false.

◆ Find()

Channel * ChannelManager::Find ( const std::string &  channel) const

Finds a channel by name.

Parameters
channelThe name of the channel to look up.
Returns
If the channel was found then a pointer to a Channel object; otherwise, nullptr.

◆ GetChans()

ChannelMap& ChannelManager::GetChans ( )
inline

Retrieves a map containing all channels keyed by the channel name.

◆ IsPrefix()

bool ChannelManager::IsPrefix ( unsigned char  prefix) const

Determines whether the specified character is a valid channel prefix.

Parameters
prefixThe channel name prefix to validate.
Returns
True if the character is a channel prefix; otherwise, false.

Member Data Documentation

◆ IsChannel

std::function<bool(const std::string&)> ChannelManager::IsChannel = DefaultIsChannel

Determines whether an channel name is valid.


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