Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

modules.cpp File Reference

#include <typeinfo>
#include <iostream>
#include "globals.h"
#include "modules.h"
#include "ctables.h"
#include "inspircd_io.h"

Include dependency graph for modules.cpp:

Include dependency graph

Go to the source code of this file.

Compounds

class  ExtMode

Typedefs

typedef std::vector< ExtModeExtModeList
typedef ExtModeList::iterator ExtModeListIter

Functions

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

Variables

ExtModeList EMode
int MODCOUNT = -1


Typedef Documentation

typedef std::vector<ExtMode> ExtModeList
 

Definition at line 28 of file modules.cpp.

typedef ExtModeList::iterator ExtModeListIter
 

Definition at line 29 of file modules.cpp.

Referenced by ModeDefined(), ModeDefinedOff(), and ModeDefinedOn().


Function Documentation

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

Definition at line 75 of file modules.cpp.

References EMode, and ModeDefined().

Referenced by Server::AddExtendedMode().

00076 {
00077         if (ModeDefined(modechar,type)) {
00078                 return false;
00079         }
00080         EMode.push_back(ExtMode(modechar,type,default_on,params_on,params_off));
00081         return true;
00082 }

std::vector<ircd_module*> factory 255   
 

bool ModeDefined char    modechar,
int    type
 

Definition at line 34 of file modules.cpp.

References EMode, and ExtModeListIter.

Referenced by DoAddExtendedMode().

00035 {
00036         log(DEBUG,"Size of extmodes vector is %d",EMode.size());
00037         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00038         {
00039                 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type);
00040                 if ((i->modechar == modechar) && (i->type == type))
00041                 {
00042                         return true;
00043                 }
00044         }
00045         return false;
00046 }

int ModeDefinedOff char    modechar,
int    type
 

Definition at line 62 of file modules.cpp.

References EMode, and ExtModeListIter.

00063 {
00064         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00065         {
00066                 if ((i->modechar == modechar) && (i->type == type))
00067                 {
00068                         return i->params_when_off;
00069                 }
00070         }
00071         return 0;
00072 }

int ModeDefinedOn char    modechar,
int    type
 

Definition at line 49 of file modules.cpp.

References EMode, and ExtModeListIter.

00050 {
00051         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00052         {
00053                 if ((i->modechar == modechar) && (i->type == type))
00054                 {
00055                         return i->params_when_on;
00056                 }
00057         }
00058         return 0;
00059 }

std::vector<Module*> modules 255   
 


Variable Documentation

ExtModeList EMode
 

Definition at line 31 of file modules.cpp.

Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), and ModeDefinedOn().

int MODCOUNT = -1
 

Definition at line 320 of file modules.cpp.


Generated on Sat Apr 3 16:36:06 2004 for InspIRCd by doxygen1.3-rc3