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

inspircd.h File Reference

#include <ctime>
#include <cstdarg>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <climits>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <map>
#include <bitset>
#include "inspircd_config.h"
#include "numerics.h"
#include "uid.h"
#include "users.h"
#include "channels.h"
#include "timer.h"
#include "hashcomp.h"
#include "typedefs.h"
#include "logger.h"
#include "usermanager.h"
#include "socket.h"
#include "ctables.h"
#include "command_parse.h"
#include "mode.h"
#include "socketengine.h"
#include "snomasks.h"
#include "cull_list.h"
#include "filelogger.h"
#include "caller.h"
#include "modules.h"
#include "configreader.h"
#include "inspstring.h"
#include "protocol.h"

Include dependency graph for inspircd.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  serverstats
 This class contains various STATS counters It is used by the InspIRCd class, which internally has an instance of it. More...
class  ConfigReaderThread
class  InspIRCd
 The main class of the irc server. More...

Defines

#define DllExport
#define CoreExport
#define printf_c   printf
#define CUSTOM_PRINTF(STRING, FIRST)
#define PATH_MAX   4096
#define MAXPARAMETERS   127
 Used to define the maximum number of parameters a command may have.
#define ERROR   -1
 Returned by some functions to indicate failure.
#define ETIREDHAMSTERS   EAGAIN
 Support for librodent - see http://www.chatspike.net/index.php?z=64.

Typedefs

typedef std::vector< std::pair<
std::string, std::string > > 
FailedPortList
 A list of failed port bindings, used for informational purposes on startup.
typedef std::deque< std::stringfile_cache
 A cached text file stored with its contents as lines.
typedef std::pair< std::string,
std::string
KeyVal
 A configuration key and value pair.
typedef std::vector< KeyValKeyValList
 A list of related configuration keys and values.
typedef std::multimap< std::string,
KeyValList
ConfigDataHash
 An entire config file, built up of KeyValLists.

Functions

template<typename T>
std::string ConvNumeric (const T &in)
 Template function to convert any input type to std::string.
std::string ConvToStr (const int in)
 Template function to convert any input type to std::string.
std::string ConvToStr (const long in)
 Template function to convert any input type to std::string.
std::string ConvToStr (const char *in)
 Template function to convert any input type to std::string.
std::string ConvToStr (const bool in)
 Template function to convert any input type to std::string.
std::string ConvToStr (char in)
 Template function to convert any input type to std::string.
template<class T>
std::string ConvToStr (const T &in)
 Template function to convert any input type to std::string.
template<typename T>
long ConvToInt (const T &in)
 Template function to convert any input type to any other type (usually an integer or numeric type).
template<typename T, typename V, typename R>
char * itoa (const T &in, V *res, R base)
 Template function to convert integer to char, storing result in *res and also returning the pointer to res.
 DEFINE_HANDLER1 (ProcessUserHandler, void, User *)
 DEFINE_HANDLER2 (IsNickHandler, bool, const char *, size_t)
 DEFINE_HANDLER1 (IsIdentHandler, bool, const char *)
 DEFINE_HANDLER1 (FindDescriptorHandler, User *, int)
 DEFINE_HANDLER1 (FloodQuitUserHandler, void, User *)
 DEFINE_HANDLER2 (IsChannelHandler, bool, const char *, size_t)
 DEFINE_HANDLER1 (IsSIDHandler, bool, const std::string &)
 DEFINE_HANDLER1 (RehashHandler, void, const std::string &)

Variables

 ENTRYPOINT


Define Documentation

#define CoreExport
 

Definition at line 19 of file inspircd.h.

#define CUSTOM_PRINTF STRING,
FIRST   ) 
 

Definition at line 31 of file inspircd.h.

#define DllExport
 

Definition at line 18 of file inspircd.h.

#define ERROR   -1
 

Returned by some functions to indicate failure.

Definition at line 106 of file inspircd.h.

Referenced by BufferedSocket::BufferedSocket(), and irc::sockets::OpenTCPSocket().

#define ETIREDHAMSTERS   EAGAIN
 

Support for librodent - see http://www.chatspike.net/index.php?z=64.

Definition at line 111 of file inspircd.h.

#define MAXPARAMETERS   127
 

Used to define the maximum number of parameters a command may have.

Definition at line 102 of file inspircd.h.

Referenced by ModuleAlias::DoCommand(), CommandParser::LoopCall(), CommandParser::ProcessCommand(), and ModuleXLineDB::ReadDatabase().

#define PATH_MAX   4096
 

Definition at line 96 of file inspircd.h.

Referenced by ServerConfig::GetFullProgDir().

#define printf_c   printf
 

Definition at line 20 of file inspircd.h.

Referenced by InspIRCd::DaemonSeed(), InspIRCd::InspIRCd(), and ModuleManager::LoadAll().


Typedef Documentation

typedef std::multimap< std::string, KeyValList > ConfigDataHash
 

An entire config file, built up of KeyValLists.

Definition at line 67 of file inspircd.h.

typedef std::vector<std::pair<std::string, std::string> > FailedPortList
 

A list of failed port bindings, used for informational purposes on startup.

Definition at line 51 of file inspircd.h.

typedef std::deque< std::string > file_cache
 

A cached text file stored with its contents as lines.

Definition at line 55 of file inspircd.h.

typedef std::pair< std::string, std::string > KeyVal
 

A configuration key and value pair.

Definition at line 59 of file inspircd.h.

typedef std::vector< KeyVal > KeyValList
 

A list of related configuration keys and values.

Definition at line 63 of file inspircd.h.


Function Documentation

template<typename T>
std::string ConvNumeric const T &  in  )  [inline]
 

Template function to convert any input type to std::string.

Definition at line 115 of file inspircd.h.

References MAXBUF.

Referenced by ConvToStr().

template<typename T>
long ConvToInt const T &  in  )  [inline]
 

Template function to convert any input type to any other type (usually an integer or numeric type).

Definition at line 180 of file inspircd.h.

Referenced by callerid_data::callerid_data(), irc::tokenstream::GetToken(), and TreeSocket::ParseUID().

template<class T>
std::string ConvToStr const T &  in  )  [inline]
 

Template function to convert any input type to std::string.

Definition at line 170 of file inspircd.h.

std::string ConvToStr char  in  )  [inline]
 

Template function to convert any input type to std::string.

Definition at line 163 of file inspircd.h.

std::string ConvToStr const bool  in  )  [inline]
 

Template function to convert any input type to std::string.

Definition at line 156 of file inspircd.h.

std::string ConvToStr const char *  in  )  [inline]
 

Template function to convert any input type to std::string.

Definition at line 149 of file inspircd.h.

std::string ConvToStr const long  in  )  [inline]
 

Template function to convert any input type to std::string.

Definition at line 142 of file inspircd.h.

References ConvNumeric().

std::string ConvToStr const int  in  )  [inline]
 

Template function to convert any input type to std::string.

Definition at line 135 of file inspircd.h.

References ConvNumeric().

Referenced by CommandWatch::add_watch(), ModuleFilterPCRE::AddFilter(), InspIRCd::BindPorts(), TreeSocket::Capab(), TreeSocket::DoBurst(), TreeSocket::DoCollision(), ModuleAlias::DoCommand(), SQLConnection::DoLeadingQuery(), InspIRCd::Exit(), CommandTaxonomy::Handle(), CommandSetidle::Handle(), CommandJumpserver::Handle(), CommandCycle::Handle(), CommandClose::Handle(), CommandClones::Handle(), CommandCheck::Handle(), CommandAlltime::Handle(), ModuleSpanningTree::HandleMap(), SpanningTreeProtocolInterface::Introduce(), XLineManager::InvokeStats(), ModuleXMLSocket::isin(), isin(), ModuleManager::Load(), ModuleSpanningTree::MapOperInfo(), NickFlood::ModeSet(), MsgFlood::ModeSet(), JoinFlood::ModeSet(), cmd_rsquit::NoticeUser(), Modulewatch::On005Numeric(), ModuleSilence::On005Numeric(), ModuleSpanningTree::OnMode(), NickFlood::OnModeChange(), MsgFlood::OnModeChange(), KickRejoin::OnModeChange(), JoinFlood::OnModeChange(), ModeChannelLimit::OnModeChange(), ModuleOverride::OnPostCommand(), Modulewatch::OnPostConnect(), ModuleXMLSocket::OnRehash(), ModuleSSLOpenSSL::OnRehash(), ModuleSSLGnuTLS::OnRehash(), Modulewatch::OnSetAway(), ModuleSpanningTree::OnStats(), ModuleZLib::OnStats(), ModuleFilterPCRE::OnStats(), ModuleFilter::OnStats(), ModuleDNSBL::OnStats(), ModuleXMLSocket::OnUnloadModule(), ModuleSSLOpenSSL::OnUnloadModule(), ModuleSSLGnuTLS::OnUnloadModule(), ModuleSpanningTree::OnUserInvite(), ModuleSpanningTree::OnUserJoin(), ModuleSpanningTree::OnUserPostNick(), Modulewatch::OnUserPostNick(), SQLquery::operator%(), SQLquery::operator,(), TreeSocket::ParseUID(), TreeSocket::ProcessLine(), ModuleSpanningTree::ProtoSendMode(), ServerConfig::Read(), DNSRequest::ResultIsReady(), ModuleHttpStats::Sanitize(), TreeSocket::SendCapabilities(), TreeSocket::SendFJoins(), HttpServerSocket::SendHeaders(), HttpServerSocket::SendHTTPError(), SpanningTreeProtocolInterface::SendMode(), SpanningTreeProtocolInterface::SendTopic(), SQLConn::SQLConn(), TreeSocket::Time(), ModuleSpanningTree::TimeToStr(), ModuleManager::Unload(), ModuleSSLOpenSSL::VerifyCertificate(), and ModuleSSLGnuTLS::VerifyCertificate().

DEFINE_HANDLER1 RehashHandler  ,
void  ,
const std::string
 

DEFINE_HANDLER1 IsSIDHandler  ,
bool  ,
const std::string
 

DEFINE_HANDLER1 FloodQuitUserHandler  ,
void  ,
User
 

DEFINE_HANDLER1 FindDescriptorHandler  ,
User ,
int 
 

DEFINE_HANDLER1 IsIdentHandler  ,
bool  ,
const char * 
 

DEFINE_HANDLER1 ProcessUserHandler  ,
void  ,
User
 

DEFINE_HANDLER2 IsChannelHandler  ,
bool  ,
const char *  ,
size_t 
 

DEFINE_HANDLER2 IsNickHandler  ,
bool  ,
const char *  ,
size_t 
 

template<typename T, typename V, typename R>
char* itoa const T &  in,
V *  res,
base
[inline]
 

Template function to convert integer to char, storing result in *res and also returning the pointer to res.

Based on Stuart Lowe's C/C++ Pages.

Parameters:
T input value
V result value
R base to convert to

Definition at line 193 of file inspircd.h.


Variable Documentation

ENTRYPOINT
 

Definition at line 926 of file inspircd.h.