The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

irc Namespace Reference

The irc namespace contains a number of helper classes. More...


Classes

struct  StrHashComp
 This class returns true if two strings match. More...
struct  irc_char_traits
 The irc_char_traits class is used for RFC-style comparison of strings. More...
class  stringjoiner
 irc::stringjoiner joins string lists into a string, using the given seperator string. More...
class  modestacker
 irc::modestacker stacks mode sequences into a list. More...
class  tokenstream
 irc::tokenstream reads a string formatted as per RFC1459 and RFC2812. More...
class  sepstream
 irc::sepstream allows for splitting token seperated lists. More...
class  commasepstream
 A derived form of sepstream, which seperates on commas. More...
class  spacesepstream
 A derived form of sepstream, which seperates on spaces. More...
class  portparser
 The portparser class seperates out a port range into integers. More...
class  dynamicbitmask
 The irc::dynamicbitmask class is used to maintain a bitmap of boolean values, which can grow to any reasonable size no matter how many bitfields are in it. More...

Namespaces

namespace  sockets
 This namespace contains various protocol-independent helper classes.

Typedefs

typedef std::basic_string<
char, irc_char_traits, std::allocator<
char > > 
string
 This typedef declares irc::string based upon irc_char_traits.
typedef std::pair< size_t,
unsigned char > 
bitfield
 Used to hold a bitfield definition in dynamicbitmask.

Functions

std::string hex (const unsigned char *raw, size_t rawsz)
 Compose a hex string from raw data.
CoreExport const char * Spacify (const char *n)
 Turn _ characters in a string into spaces.


Detailed Description

The irc namespace contains a number of helper classes.

Typedef Documentation

typedef std::pair<size_t, unsigned char> irc::bitfield
 

Used to hold a bitfield definition in dynamicbitmask.

You must be allocated one of these by dynamicbitmask::Allocate(), you should not fill the values yourself!

Definition at line 412 of file hashcomp.h.

typedef std::basic_string<char, irc_char_traits, std::allocator<char> > irc::string
 

This typedef declares irc::string based upon irc_char_traits.

Definition at line 128 of file hashcomp.h.


Function Documentation

CoreExport std::string irc::hex const unsigned char *  raw,
size_t  rawsz
 

Compose a hex string from raw data.

Parameters:
raw The raw data to compose hex from rawsz The size of the raw data buffer
Returns:
The hex string.

Definition at line 287 of file hashcomp.cpp.

References MAXBUF.

Referenced by DNS::MakeIP6Int(), ModuleSSLOpenSSL::VerifyCertificate(), and ModuleSSLGnuTLS::VerifyCertificate().

CoreExport const char * irc::Spacify const char *  n  ) 
 

Turn _ characters in a string into spaces.

Parameters:
n String to translate
Returns:
The new value with _ translated to space.

Definition at line 308 of file hashcomp.cpp.

References MAXBUF, and strlcpy().

Referenced by CommandCheck::Handle(), TreeSocket::OperType(), and ModuleSQLOper::OperUser().