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
InspIRCdServerInstance
int MODCOUNT = -1
std::vector< Module * > modules
std::vector< ircd_module * > factory
std::vector< InspSocket * > module_sockets
time_t TIME
userrecfd_ref_table [65536]
user_hash clientlist
chan_hash chanlist
command_table cmdlist
ExtModeList EMode


Function Documentation

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

Definition at line 134 of file modules.cpp.

References EMode, and ModeDefined().

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

00135 {
00136         if (ModeDefined(modechar,type)) {
00137                 return false;
00138         }
00139         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
00140         return true;
00141 }

std::vector<ircd_module*> factory 255   ) 
 

bool ModeDefined char  modechar,
int  type
 

Definition at line 71 of file modules.cpp.

References EMode.

Referenced by DoAddExtendedMode().

00072 {
00073         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00074         {
00075                 if ((i->modechar == modechar) && (i->type == type))
00076                 {
00077                         return true;
00078                 }
00079         }
00080         return false;
00081 }

int ModeDefinedOff char  modechar,
int  type
 

Definition at line 121 of file modules.cpp.

References EMode.

00122 {
00123         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00124         {
00125                 if ((i->modechar == modechar) && (i->type == type))
00126                 {
00127                         return i->params_when_off;
00128                 }
00129         }
00130         return 0;
00131 }

int ModeDefinedOn char  modechar,
int  type
 

Definition at line 108 of file modules.cpp.

References EMode.

00109 {
00110         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00111         {
00112                 if ((i->modechar == modechar) && (i->type == type))
00113                 {
00114                         return i->params_when_on;
00115                 }
00116         }
00117         return 0;
00118 }

bool ModeDefinedOper char  modechar,
int  type
 

Definition at line 95 of file modules.cpp.

References EMode.

00096 {
00097         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00098         {
00099                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
00100                 {
00101                         return true;
00102                 }
00103         }
00104         return false;
00105 }

bool ModeIsListMode char  modechar,
int  type
 

Definition at line 83 of file modules.cpp.

References EMode.

00084 {
00085         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00086         {
00087                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
00088                 {
00089                         return true;
00090                 }
00091         }
00092         return false;
00093 }

void ModeMakeList char  modechar  ) 
 

Definition at line 144 of file modules.cpp.

References EMode, and MT_CHANNEL.

Referenced by Server::AddExtendedListMode().

00145 {
00146         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00147         {
00148                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
00149                 {
00150                         i->list = true;
00151                         return;
00152                 }
00153         }
00154         return;
00155 }

std::vector<Module*> modules 255   ) 
 


Variable Documentation

chan_hash chanlist
 

user_hash clientlist
 

command_table cmdlist
 

ServerConfig* Config
 

ExtModeList EMode
 

Definition at line 68 of file modules.cpp.

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

std::vector<ircd_module*> factory
 

userrec* fd_ref_table[65536]
 

int MODCOUNT = -1
 

Definition at line 935 of file modules.cpp.

std::vector<InspSocket*> module_sockets
 

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

std::vector<Module*> modules
 

SocketEngine* SE
 

InspIRCd* ServerInstance
 

time_t TIME
 


Generated on Thu Dec 15 11:14:16 2005 for InspIRCd by  doxygen 1.4.4-20050815