Main Page   Namespace List   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 "wildcard.h"
#include "mode.h"
#include "message.h"
#include "commands.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)
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)
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 32 of file modules.cpp.

typedef ExtModeList::iterator ExtModeListIter
 

Definition at line 33 of file modules.cpp.

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


Function Documentation

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

Definition at line 93 of file modules.cpp.

References EMode, and ModeDefined().

Referenced by Server::AddExtendedMode().

00094 {
00095         if (ModeDefined(modechar,type)) {
00096                 return false;
00097         }
00098         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
00099         return true;
00100 }

std::vector<ircd_module*> factory 255   
 

bool ModeDefined char    modechar,
int    type
 

Definition at line 38 of file modules.cpp.

References EMode, and ExtModeListIter.

Referenced by DoAddExtendedMode().

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

int ModeDefinedOff char    modechar,
int    type
 

Definition at line 80 of file modules.cpp.

References EMode, and ExtModeListIter.

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

int ModeDefinedOn char    modechar,
int    type
 

Definition at line 67 of file modules.cpp.

References EMode, and ExtModeListIter.

00068 {
00069         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00070         {
00071                 if ((i->modechar == modechar) && (i->type == type))
00072                 {
00073                         return i->params_when_on;
00074                 }
00075         }
00076         return 0;
00077 }

bool ModeDefinedOper char    modechar,
int    type
 

Definition at line 52 of file modules.cpp.

References EMode, and ExtModeListIter.

00053 {
00054         log(DEBUG,"Size of extmodes vector is %d",EMode.size());
00055         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00056         {
00057                 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type);
00058                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
00059                 {
00060                         return true;
00061                 }
00062         }
00063         return false;
00064 }

std::vector<Module*> modules 255   
 


Variable Documentation

ExtModeList EMode
 

Definition at line 35 of file modules.cpp.

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

int MODCOUNT = -1
 

Definition at line 442 of file modules.cpp.


Generated on Thu Apr 29 16:21:53 2004 for InspIRCd by doxygen1.3-rc3