Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

modules.cpp File Reference

#include "inspircd_config.h"
#include "inspircd.h"
#include "inspircd_io.h"
#include <unistd.h>
#include <sys/errno.h>
#include <time.h>
#include <string>
#include <hash_map>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "message.h"
#include "mode.h"
#include "xline.h"
#include "commands.h"
#include "inspstring.h"
#include "helperfuncs.h"
#include "hashcomp.h"
#include "socket.h"
#include "socketengine.h"
#include "typedefs.h"
#include "command_parse.h"

Include dependency graph for modules.cpp:

Go to the source code of this file.

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

ServerConfigConfig
InspIRCdServerInstance
int MODCOUNT = -1
std::vector< Module * > modules
std::vector< ircd_module * > factory
std::vector< InspSocket * > module_sockets
time_t TIME
userrecfd_ref_table [65536]
user_hash clientlist
chan_hash chanlist
command_table cmdlist
ExtModeList EMode


Function Documentation

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

Definition at line 133 of file modules.cpp.

References EMode, and ModeDefined().

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

00134 {
00135         if (ModeDefined(modechar,type)) {
00136                 return false;
00137         }
00138         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
00139         return true;
00140 }

std::vector<ircd_module*> factory 255   ) 
 

bool ModeDefined char  modechar,
int  type
 

Definition at line 70 of file modules.cpp.

References EMode.

Referenced by DoAddExtendedMode().

00071 {
00072         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00073         {
00074                 if ((i->modechar == modechar) && (i->type == type))
00075                 {
00076                         return true;
00077                 }
00078         }
00079         return false;
00080 }

int ModeDefinedOff char  modechar,
int  type
 

Definition at line 120 of file modules.cpp.

References EMode.

00121 {
00122         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00123         {
00124                 if ((i->modechar == modechar) && (i->type == type))
00125                 {
00126                         return i->params_when_off;
00127                 }
00128         }
00129         return 0;
00130 }

int ModeDefinedOn char  modechar,
int  type
 

Definition at line 107 of file modules.cpp.

References EMode.

00108 {
00109         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00110         {
00111                 if ((i->modechar == modechar) && (i->type == type))
00112                 {
00113                         return i->params_when_on;
00114                 }
00115         }
00116         return 0;
00117 }

bool ModeDefinedOper char  modechar,
int  type
 

Definition at line 94 of file modules.cpp.

References EMode.

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

bool ModeIsListMode char  modechar,
int  type
 

Definition at line 82 of file modules.cpp.

References EMode.

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

void ModeMakeList char  modechar  ) 
 

Definition at line 143 of file modules.cpp.

References EMode, and MT_CHANNEL.

Referenced by Server::AddExtendedListMode().

00144 {
00145         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
00146         {
00147                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
00148                 {
00149                         i->list = true;
00150                         return;
00151                 }
00152         }
00153         return;
00154 }

std::vector<Module*> modules 255   ) 
 


Variable Documentation

chan_hash chanlist
 

user_hash clientlist
 

Referenced by AddClient(), kill_link(), kill_link_silent(), and ReHashNick().

command_table cmdlist
 

ServerConfig* Config
 

ExtModeList EMode
 

Definition at line 67 of file modules.cpp.

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

std::vector<ircd_module*> factory
 

userrec* fd_ref_table[65536]
 

int MODCOUNT = -1
 

Definition at line 934 of file modules.cpp.

std::vector<InspSocket*> module_sockets
 

Referenced by Server::AddSocket(), and Server::DelSocket().

std::vector<Module*> modules
 

InspIRCd* ServerInstance
 

time_t TIME
 


Generated on Mon Dec 19 18:02:14 2005 for InspIRCd by  doxygen 1.4.4-20050815