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

typedef ExtModeList::iterator ExtModeListIter
 

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

References EMode, and ModeDefined().

Referenced by Server::AddExtendedMode().

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

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

References EMode, and ExtModeListIter.

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

int ModeDefinedOn char    modechar,
int    type
 

Definition at line 63 of file modules.cpp.

References EMode, and ExtModeListIter.

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

bool ModeDefinedOper char    modechar,
int    type
 

Definition at line 48 of file modules.cpp.

References EMode, and ExtModeListIter.

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

std::vector<Module*> modules 255   
 


Variable Documentation

ExtModeList EMode
 

Definition at line 31 of file modules.cpp.

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

int MODCOUNT = -1
 

Definition at line 380 of file modules.cpp.


Generated on Tue Apr 6 21:13:31 2004 for InspIRCd by doxygen1.3-rc3