|
|||
|
|||
|
#include <ctime>#include <cstdarg>#include <algorithm>#include <cmath>#include <cstring>#include <climits>#include <cstdio>#include <time.h>#include <string>#include <sstream>#include <list>#include "inspircd_config.h"#include "users.h"#include "channels.h"#include "socket.h"#include "mode.h"#include "socketengine.h"#include "command_parse.h"#include "snomasks.h"#include "cull_list.h"#include <limits.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 | FileLogger |
| This class implements a nonblocking log-writer. More... | |
| class | InspIRCd |
| The main class of the irc server. More... | |
Defines | |
| #define | _FILE_OFFSET_BITS 64 |
| #define | DllExport |
| #define | CoreExport |
| #define | printf_c printf |
| #define | PATH_MAX 4096 |
| #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. | |
| #define | IS_SINGLE(x, y) ( (*x == y) && (*(x+1) == 0) ) |
| This define is used in place of strcmp when we want to check if a char* string contains only one letter. | |
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::map< irc::string, unsigned int > | clonemap |
| A list of ip addresses cross referenced against clone counts. | |
Enumerations | |
| enum | DebugLevel { DEBUG = 10, VERBOSE = 20, DEFAULT = 30, SPARSE = 40, NONE = 50 } |
| Debug levels for use with InspIRCd::Log(). More... | |
Functions | |
| template<typename T> | |
| void | DELETE (T *x) |
| Delete a pointer, and NULL its value. | |
| 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 unsigned 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. | |
|
|
Definition at line 17 of file inspircd.h. |
|
|
Definition at line 24 of file inspircd.h. |
|
|
Definition at line 23 of file inspircd.h. |
|
|
Returned by some functions to indicate failure.
Definition at line 65 of file inspircd.h. Referenced by InspSocket::InspSocket(), and irc::sockets::OpenTCPSocket(). |
|
|
Support for librodent - see http://www.chatspike.net/index.php?z=64.
Definition at line 70 of file inspircd.h. |
|
|
This define is used in place of strcmp when we want to check if a char* string contains only one letter. Pretty fast, its just two compares and an addition. Definition at line 89 of file inspircd.h. |
|
|
Definition at line 60 of file inspircd.h. Referenced by ServerConfig::GetFullProgDir(). |
|
|
Definition at line 25 of file inspircd.h. Referenced by InspIRCd::DaemonSeed(), InspIRCd::LoadAllModules(), and InspIRCd::Start(). |
|
|
A list of ip addresses cross referenced against clone counts.
Definition at line 316 of file inspircd.h. |
|
|
A list of failed port bindings, used for informational purposes on startup.
Definition at line 313 of file inspircd.h. |
|
|
Debug levels for use with InspIRCd::Log().
Definition at line 74 of file inspircd.h. 00075 { 00076 DEBUG = 10, 00077 VERBOSE = 20, 00078 DEFAULT = 30, 00079 SPARSE = 40, 00080 NONE = 50 00081 };
|
|
||||||||||
|
Template function to convert any input type to std::string.
Definition at line 101 of file inspircd.h. References MAXBUF. Referenced by ConvToStr(). 00102 { 00103 if (in == 0) return "0"; 00104 char res[MAXBUF]; 00105 char* out = res; 00106 T quotient = in; 00107 while (quotient) { 00108 *out = "0123456789"[ std::abs( (long)quotient % 10 ) ]; 00109 ++out; 00110 quotient /= 10; 00111 } 00112 if ( in < 0) 00113 *out++ = '-'; 00114 *out = 0; 00115 std::reverse(res,out); 00116 return res; 00117 }
|
|
||||||||||
|
Template function to convert any input type to any other type (usually an integer or numeric type).
Definition at line 173 of file inspircd.h. Referenced by TreeSocket::AddLine(), irc::tokenstream::GetToken(), and TreeSocket::IntroduceClient(). 00174 { 00175 std::stringstream tmp; 00176 if (!(tmp << in)) return 0; 00177 return atoi(tmp.str().c_str()); 00178 }
|
|
||||||||||
|
Template function to convert any input type to std::string.
Definition at line 163 of file inspircd.h. 00164 { 00165 std::stringstream tmp; 00166 if (!(tmp << in)) return std::string(); 00167 return tmp.str(); 00168 }
|
|
|
Template function to convert any input type to std::string.
Definition at line 156 of file inspircd.h. 00157 { 00158 return std::string(in,1); 00159 }
|
|
|
Template function to convert any input type to std::string.
Definition at line 149 of file inspircd.h.
|
|
|
Template function to convert any input type to std::string.
Definition at line 142 of file inspircd.h.
|
|
|
Template function to convert any input type to std::string.
Definition at line 135 of file inspircd.h. References ConvNumeric(). 00136 { 00137 return ConvNumeric(in); 00138 }
|
|
|
Template function to convert any input type to std::string.
Definition at line 128 of file inspircd.h. References ConvNumeric(). 00129 { 00130 return ConvNumeric(in); 00131 }
|
|
|
||||||||||
|
||||||||||||||||||||
|
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.
Definition at line 186 of file inspircd.h. 00187 { 00188 if (base < 2 || base > 16) { *res = 0; return res; } 00189 char* out = res; 00190 int quotient = in; 00191 while (quotient) { 00192 *out = "0123456789abcdef"[ std::abs( quotient % base ) ]; 00193 ++out; 00194 quotient /= base; 00195 } 00196 if ( in < 0 && base == 10) *out++ = '-'; 00197 std::reverse( res, out ); 00198 *out = 0; 00199 return res; 00200 }
|