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 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 29 of file modules.cpp.

typedef ExtModeList::iterator ExtModeListIter
 

Definition at line 30 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 90 of file modules.cpp.

References EMode, and ModeDefined().

Referenced by Server::AddExtendedMode().

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

std::vector<ircd_module*> factory 255   
 

bool ModeDefined char    modechar,
int    type
 

Definition at line 35 of file modules.cpp.

References EMode, and ExtModeListIter.

Referenced by DoAddExtendedMode().

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

int ModeDefinedOff char    modechar,
int    type
 

Definition at line 77 of file modules.cpp.

References EMode, and ExtModeListIter.

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

int ModeDefinedOn char    modechar,
int    type
 

Definition at line 64 of file modules.cpp.

References EMode, and ExtModeListIter.

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

bool ModeDefinedOper char    modechar,
int    type
 

Definition at line 49 of file modules.cpp.

References EMode, and ExtModeListIter.

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

std::vector<Module*> modules 255   
 


Variable Documentation

ExtModeList EMode
 

Definition at line 32 of file modules.cpp.

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

int MODCOUNT = -1
 

Definition at line 429 of file modules.cpp.


Generated on Sat Apr 17 13:31:41 2004 for InspIRCd by doxygen1.3-rc3