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 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

ExtModeList EMode
int MODCOUNT = -1


Typedef Documentation

typedef std::vector<ExtMode> ExtModeList
 

Definition at line 33 of file modules.cpp.

typedef ExtModeList::iterator ExtModeListIter
 

Definition at line 34 of file modules.cpp.

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


Function Documentation

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

Definition at line 108 of file modules.cpp.

References EMode, and ModeDefined().

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

00109 {
00110         if (ModeDefined(modechar,type)) {
00111                 return false;
00112         }
00113         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
00114         return true;
00115 }

std::vector<ircd_module*> factory 255   
 

bool ModeDefined char    modechar,
int    type
 

Definition at line 39 of file modules.cpp.

References EMode, and ExtModeListIter.

Referenced by DoAddExtendedMode().

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

int ModeDefinedOff char    modechar,
int    type
 

Definition at line 95 of file modules.cpp.

References EMode, and ExtModeListIter.

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

int ModeDefinedOn char    modechar,
int    type
 

Definition at line 82 of file modules.cpp.

References EMode, and ExtModeListIter.

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

bool ModeDefinedOper char    modechar,
int    type
 

Definition at line 67 of file modules.cpp.

References EMode, and ExtModeListIter.

00068 {
00069         log(DEBUG,"Size of extmodes vector is %d",EMode.size());
00070         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00071         {
00072                 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type);
00073                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
00074                 {
00075                         return true;
00076                 }
00077         }
00078         return false;
00079 }

bool ModeIsListMode char    modechar,
int    type
 

Definition at line 53 of file modules.cpp.

References EMode, and ExtModeListIter.

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

void ModeMakeList char    modechar
 

Definition at line 118 of file modules.cpp.

References EMode, ExtModeListIter, and MT_CHANNEL.

Referenced by Server::AddExtendedListMode().

00119 {
00120         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00121         {
00122                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
00123                 {
00124                         i->list = true;
00125                         return;
00126                 }
00127         }
00128         return;
00129 }

std::vector<Module*> modules 255   
 


Variable Documentation

ExtModeList EMode
 

Definition at line 36 of file modules.cpp.

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

int MODCOUNT = -1
 

Definition at line 484 of file modules.cpp.


Generated on Sat May 1 13:39:06 2004 for InspIRCd by doxygen1.3-rc3