]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
Moved some other stuff into ServerConfig
[user/henk/code/inspircd.git] / src / channels.cpp
index 4bbb69b9b5867fd743d4fd9d7901d616ef768a1b..573289db918027d73f71482fdce0d3999b3c0862 100644 (file)
 
 using namespace std;
 
+#include "inspircd_config.h"
 #include "inspircd.h"
 #include "inspircd_io.h"
 #include "inspircd_util.h"
-#include "inspircd_config.h"
 #include <unistd.h>
 #include <sys/errno.h>
 #include <sys/ioctl.h>
@@ -35,9 +35,7 @@ using namespace std;
 #include <sstream>
 #include <vector>
 #include <deque>
-#include "connection.h"
 #include "users.h"
-#include "servers.h"
 #include "ctables.h"
 #include "globals.h"
 #include "modules.h"
@@ -55,54 +53,22 @@ using namespace std;
 #define nspace std
 #endif
 
+extern ServerConfig* Config;
+
 extern int MODCOUNT;
-extern std::vector<Module*, __single_client_alloc> modules;
-extern std::vector<ircd_module*, __single_client_alloc> factory;
-
-extern int LogLevel;
-extern char ServerName[MAXBUF];
-extern char Network[MAXBUF];
-extern char ServerDesc[MAXBUF];
-extern char AdminName[MAXBUF];
-extern char AdminEmail[MAXBUF];
-extern char AdminNick[MAXBUF];
-extern char diepass[MAXBUF];
-extern char restartpass[MAXBUF];
-extern char motd[MAXBUF];
-extern char rules[MAXBUF];
-extern char list[MAXBUF];
-extern char PrefixQuit[MAXBUF];
-extern char DieValue[MAXBUF];
-
-extern int debugging;
+extern std::vector<Module*> modules;
+extern std::vector<ircd_module*> factory;
 extern int WHOWAS_STALE;
 extern int WHOWAS_MAX;
-extern int DieDelay;
 extern time_t startup_time;
-extern int NetBufferSize;
-int MaxWhoResults;
-extern time_t nb_start;
-
-extern std::vector<std::string, __single_client_alloc> module_names;
-
+extern std::vector<std::string> module_names;
 extern int boundPortCount;
-extern int portCount;
-extern int SERVERportCount;
-extern int ports[MAXSOCKS];
-extern int defaultRoute;
-
-extern std::vector<long> auth_cookies;
 extern std::stringstream config_f;
-
-extern serverrec* me[32];
-
-extern FILE *log_file;
-
 extern time_t TIME;
 
 using namespace std;
 
-std::vector<ModeParameter, __single_client_alloc> custom_mode_params;
+std::vector<ModeParameter> custom_mode_params;
 
 chanrec::chanrec()
 {
@@ -158,7 +124,7 @@ void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on)
        {
                if (custom_mode_params.size())
                {
-                       for (vector<ModeParameter, __single_client_alloc>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+                       for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
                        {
                                if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
                                {
@@ -174,15 +140,14 @@ void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on)
 
 bool chanrec::IsCustomModeSet(char mode)
 {
-       log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
-       return (strchr(this->custom_modes,mode) != 0);
+       return (strchr(this->custom_modes,mode));
 }
 
 std::string chanrec::GetModeParameter(char mode)
 {
        if (custom_mode_params.size())
        {
-               for (vector<ModeParameter, __single_client_alloc>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+               for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
                {
                        if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
                        {
@@ -206,7 +171,7 @@ void chanrec::AddUser(char* castuser)
 
 void chanrec::DelUser(char* castuser)
 {
-       for (std::vector<char*, __single_client_alloc>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
+       for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
        {
                if (*a == castuser)
                {
@@ -218,7 +183,7 @@ void chanrec::DelUser(char* castuser)
        log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
 }
 
-std::vector<char*, __single_client_alloc> *chanrec::GetUsers()
+std::vector<char*> *chanrec::GetUsers()
 {
        return &internal_userlist;
 }