From 877a15fc3db18be9131c886720516eae6f582886 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 1 May 2004 16:54:50 +0000 Subject: Added extra docs to cover OnUserSync etc git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@769 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/channels_8cpp-source.html | 283 +++++++++++++++++++----------- 1 file changed, 184 insertions(+), 99 deletions(-) (limited to 'docs/module-doc/channels_8cpp-source.html') diff --git a/docs/module-doc/channels_8cpp-source.html b/docs/module-doc/channels_8cpp-source.html index aee88a231..867825333 100644 --- a/docs/module-doc/channels_8cpp-source.html +++ b/docs/module-doc/channels_8cpp-source.html @@ -6,107 +6,192 @@
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  
-

channels.cpp

Go to the documentation of this file.
00001 #include "inspircd_config.h" 
-00002 #include "channels.h"
-00003 #include "inspircd.h"
-00004 #include <stdio.h>
-00005 #include <string>
-00006 #include <vector>
-00007 
-00008 using namespace std;
-00009 
-00010 std::vector<ModeParameter> custom_mode_params;
-00011 
-00012 chanrec::chanrec()
-00013 {
-00014         strcpy(name,"");
-00015         strcpy(custom_modes,"");
-00016         strcpy(topic,"");
-00017         strcpy(setby,"");
-00018         strcpy(key,"");
-00019         created = topicset = limit = 0;
-00020         topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
-00021 }
-00022 
-00023 void chanrec::SetCustomMode(char mode,bool mode_on)
-00024 {
-00025         if (mode_on) {
-00026                 char m[3];
-00027                 m[0] = mode;
-00028                 m[1] = '\0';
-00029                 if (!strchr(this->custom_modes,mode))
-00030                 {
-00031                         strncat(custom_modes,m,MAXMODES);
-00032                 }
-00033                 log(DEBUG,"Custom mode %c set",mode);
-00034         }
-00035         else {
-00036                 char temp[MAXBUF];
-00037                 int count = 0;
-00038                 for (int q = 0; q < strlen(custom_modes); q++) {
-00039                         if (custom_modes[q] != mode) {
-00040                                 temp[count++] = mode;
-00041                         }
-00042                 }
-00043                 temp[count] = '\0';
-00044                 strncpy(custom_modes,temp,MAXMODES);
-00045                 log(DEBUG,"Custom mode %c removed",mode);
-00046                 this->SetCustomModeParam(mode,"",false);
-00047         }
-00048 }
+

channels.cpp

Go to the documentation of this file.
00001 #include "inspircd.h"
+00002 #include "inspircd_io.h"
+00003 #include "inspircd_util.h"
+00004 #include "inspircd_config.h"
+00005 #include <unistd.h>
+00006 #include <fcntl.h>
+00007 #include <sys/errno.h>
+00008 #include <sys/ioctl.h>
+00009 #include <sys/utsname.h>
+00010 #include <cstdio>
+00011 #include <time.h>
+00012 #include <string>
+00013 #ifdef GCC3
+00014 #include <ext/hash_map>
+00015 #else
+00016 #include <hash_map>
+00017 #endif
+00018 #include <map>
+00019 #include <sstream>
+00020 #include <vector>
+00021 #include <errno.h>
+00022 #include <deque>
+00023 #include <errno.h>
+00024 #include <unistd.h>
+00025 #include <sched.h>
+00026 #include "connection.h"
+00027 #include "users.h"
+00028 #include "servers.h"
+00029 #include "ctables.h"
+00030 #include "globals.h"
+00031 #include "modules.h"
+00032 #include "dynamic.h"
+00033 #include "wildcard.h"
+00034 #include "message.h"
+00035 #include "mode.h"
+00036 #include "xline.h"
+00037 
+00038 #ifdef GCC3
+00039 #define nspace __gnu_cxx
+00040 #else
+00041 #define nspace std
+00042 #endif
+00043 
+00044 using namespace std;
+00045 
+00046 extern int MODCOUNT;
+00047 extern vector<Module*> modules;
+00048 extern vector<ircd_module*> factory;
 00049 
-00050 void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on)
-00051 {
-00052 
-00053         log(DEBUG,"SetCustomModeParam called");
-00054         ModeParameter M;
-00055         M.mode = mode;
-00056         strcpy(M.channel,this->name);
-00057         strcpy(M.parameter,parameter);
-00058         if (mode_on)
-00059         {
-00060                 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
-00061                 custom_mode_params.push_back(M);
-00062         }
-00063         else
-00064         {
-00065                 if (custom_mode_params.size())
-00066                 {
-00067                         for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00068                         {
-00069                                 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00070                                 {
-00071                                         log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter);
-00072                                         custom_mode_params.erase(i);
-00073                                         return;
-00074                                 }
-00075                         }
-00076                 }
-00077                 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!");
-00078         }
-00079 }
-00080 
-00081 bool chanrec::IsCustomModeSet(char mode)
-00082 {
-00083         log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
-00084         return (strchr(this->custom_modes,mode) != 0);
-00085 }
+00050 extern int LogLevel;
+00051 extern char ServerName[MAXBUF];
+00052 extern char Network[MAXBUF];
+00053 extern char ServerDesc[MAXBUF];
+00054 extern char AdminName[MAXBUF];
+00055 extern char AdminEmail[MAXBUF];
+00056 extern char AdminNick[MAXBUF];
+00057 extern char diepass[MAXBUF];
+00058 extern char restartpass[MAXBUF];
+00059 extern char motd[MAXBUF];
+00060 extern char rules[MAXBUF];
+00061 extern char list[MAXBUF];
+00062 extern char PrefixQuit[MAXBUF];
+00063 extern char DieValue[MAXBUF];
+00064 
+00065 extern int debugging;
+00066 extern int WHOWAS_STALE;
+00067 extern int WHOWAS_MAX;
+00068 extern int DieDelay;
+00069 extern time_t startup_time;
+00070 extern int NetBufferSize;
+00071 int MaxWhoResults;
+00072 extern time_t nb_start;
+00073 
+00074 extern std::vector<int> fd_reap;
+00075 extern std::vector<std::string> module_names;
+00076 
+00077 extern char bannerBuffer[MAXBUF];
+00078 extern int boundPortCount;
+00079 extern int portCount;
+00080 extern int UDPportCount;
+00081 extern int ports[MAXSOCKS];
+00082 extern int defaultRoute;
+00083 
+00084 extern std::vector<long> auth_cookies;
+00085 extern std::stringstream config_f;
 00086 
-00087 std::string chanrec::GetModeParameter(char mode)
-00088 {
-00089         if (custom_mode_params.size())
-00090         {
-00091                 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00092                 {
-00093                         if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00094                         {
-00095                                 return std::string(i->parameter);
-00096                         }
-00097                 }
-00098         }
-00099         return std::string("");
-00100 }
-

Generated on Sat May 1 13:38:59 2004 for InspIRCd by +00087 extern serverrec* me[32]; +00088 +00089 extern FILE *log_file; +00090 +00091 +00092 using namespace std; +00093 +00094 std::vector<ModeParameter> custom_mode_params; +00095 +00096 chanrec::chanrec() +00097 { +00098 strcpy(name,""); +00099 strcpy(custom_modes,""); +00100 strcpy(topic,""); +00101 strcpy(setby,""); +00102 strcpy(key,""); +00103 created = topicset = limit = 0; +00104 topiclock = noexternal = inviteonly = moderated = secret = c_private = false; +00105 } +00106 +00107 void chanrec::SetCustomMode(char mode,bool mode_on) +00108 { +00109 if (mode_on) { +00110 char m[3]; +00111 m[0] = mode; +00112 m[1] = '\0'; +00113 if (!strchr(this->custom_modes,mode)) +00114 { +00115 strncat(custom_modes,m,MAXMODES); +00116 } +00117 log(DEBUG,"Custom mode %c set",mode); +00118 } +00119 else { +00120 char temp[MAXBUF]; +00121 int count = 0; +00122 for (int q = 0; q < strlen(custom_modes); q++) { +00123 if (custom_modes[q] != mode) { +00124 temp[count++] = mode; +00125 } +00126 } +00127 temp[count] = '\0'; +00128 strncpy(custom_modes,temp,MAXMODES); +00129 log(DEBUG,"Custom mode %c removed",mode); +00130 this->SetCustomModeParam(mode,"",false); +00131 } +00132 } +00133 +00134 +00135 void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on) +00136 { +00137 +00138 log(DEBUG,"SetCustomModeParam called"); +00139 ModeParameter M; +00140 M.mode = mode; +00141 strcpy(M.channel,this->name); +00142 strcpy(M.parameter,parameter); +00143 if (mode_on) +00144 { +00145 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter); +00146 custom_mode_params.push_back(M); +00147 } +00148 else +00149 { +00150 if (custom_mode_params.size()) +00151 { +00152 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +00153 { +00154 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +00155 { +00156 log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter); +00157 custom_mode_params.erase(i); +00158 return; +00159 } +00160 } +00161 } +00162 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!"); +00163 } +00164 } +00165 +00166 bool chanrec::IsCustomModeSet(char mode) +00167 { +00168 log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes); +00169 return (strchr(this->custom_modes,mode) != 0); +00170 } +00171 +00172 std::string chanrec::GetModeParameter(char mode) +00173 { +00174 if (custom_mode_params.size()) +00175 { +00176 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +00177 { +00178 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +00179 { +00180 return std::string(i->parameter); +00181 } +00182 } +00183 } +00184 return std::string(""); +00185 } +

Generated on Sat May 1 17:50:06 2004 for InspIRCd by doxygen1.3-rc3
-- cgit v1.3.1-10-gc9f91