Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

modules.cpp File Reference

#include "inspircd_config.h"
#include "inspircd.h"
#include "inspircd_io.h"
#include "inspircd_util.h"
#include <unistd.h>
#include <sys/errno.h>
#include <time.h>
#include <string>
#include <hash_map>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "message.h"
#include "mode.h"
#include "xline.h"
#include "commands.h"
#include "inspstring.h"
#include "helperfuncs.h"
#include "hashcomp.h"
#include "socket.h"
#include "socketengine.h"
#include "typedefs.h"

Include dependency graph for modules.cpp:

Go to the source code of this file.

Functions

bool ModeDefined (char modechar, int type)
bool ModeIsListMode (char modechar, int type)
bool ModeDefinedOper (char modechar, int type)
int ModeDefinedOn (char modechar, int type)
int ModeDefinedOff (char modechar, int type)
bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)
void ModeMakeList (char modechar)
std::vector< Module * > modules (255)
std::vector< ircd_module * > factory (255)

Variables

SocketEngineSE
ServerConfigConfig
int MODCOUNT = -1
std::vector< Module * > modules
std::vector< ircd_module * > factory
std::vector< InspSocket * > module_sockets
time_t TIME
int WHOWAS_STALE
int WHOWAS_MAX
time_t startup_time
int boundPortCount
int portCount
int ports [MAXSOCKS]
userrecfd_ref_table [65536]
user_hash clientlist
chan_hash chanlist
whowas_hash whowas
command_table cmdlist
address_cache IP
ExtModeList EMode


Function Documentation

bool DoAddExtendedMode char  modechar,
int  type,
bool  requires_oper,
int  params_on,
int  params_off
 

Definition at line 142 of file modules.cpp.

References EMode, and ModeDefined().

Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().

00143 {
00144         if (ModeDefined(modechar,type)) {
00145                 return false;
00146         }
00147         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
00148         return true;
00149 }

std::vector<ircd_module*> factory 255   ) 
 

bool ModeDefined char  modechar,
int  type
 

Definition at line 79 of file modules.cpp.

References EMode.

Referenced by DoAddExtendedMode().

00080 {
00081         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00082         {
00083                 if ((i->modechar == modechar) && (i->type == type))
00084                 {
00085                         return true;
00086                 }
00087         }
00088         return false;
00089 }

int ModeDefinedOff char  modechar,
int  type
 

Definition at line 129 of file modules.cpp.

References EMode.

00130 {
00131         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00132         {
00133                 if ((i->modechar == modechar) && (i->type == type))
00134                 {
00135                         return i->params_when_off;
00136                 }
00137         }
00138         return 0;
00139 }

int ModeDefinedOn char  modechar,
int  type
 

Definition at line 116 of file modules.cpp.

References EMode.

00117 {
00118         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00119         {
00120                 if ((i->modechar == modechar) && (i->type == type))
00121                 {
00122                         return i->params_when_on;
00123                 }
00124         }
00125         return 0;
00126 }

bool ModeDefinedOper char  modechar,
int  type
 

Definition at line 103 of file modules.cpp.

References EMode.

00104 {
00105         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00106         {
00107                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
00108                 {
00109                         return true;
00110                 }
00111         }
00112         return false;
00113 }

bool ModeIsListMode char  modechar,
int  type
 

Definition at line 91 of file modules.cpp.

References EMode.

00092 {
00093         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00094         {
00095                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
00096                 {
00097                         return true;
00098                 }
00099         }
00100         return false;
00101 }

void ModeMakeList char  modechar  ) 
 

Definition at line 152 of file modules.cpp.

References EMode, and MT_CHANNEL.

Referenced by Server::AddExtendedListMode().

00153 {
00154         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00155         {
00156                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
00157                 {
00158                         i->list = true;
00159                         return;
00160                 }
00161         }
00162         return;
00163 }

std::vector<Module*> modules 255   ) 
 


Variable Documentation

int boundPortCount
 

chan_hash chanlist
 

user_hash clientlist
 

command_table cmdlist
 

ServerConfig* Config
 

ExtModeList EMode
 

Definition at line 76 of file modules.cpp.

Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().

std::vector<ircd_module*> factory
 

userrec* fd_ref_table[65536]
 

address_cache IP
 

int MODCOUNT = -1
 

Definition at line 938 of file modules.cpp.

std::vector<InspSocket*> module_sockets
 

Referenced by Server::AddSocket(), and Server::DelSocket().

std::vector<Module*> modules
 

int portCount
 

int ports[MAXSOCKS]
 

SocketEngine* SE
 

time_t startup_time
 

time_t TIME
 

whowas_hash whowas
 

int WHOWAS_MAX
 

int WHOWAS_STALE
 


Generated on Wed Dec 14 15:55:47 2005 for InspIRCd by  doxygen 1.4.4-20050815