mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Removed __single_client_alloc again because gcc devs were smoking crack and removed it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1406 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
31ea95dfe6
commit
55bd1494b0
@ -84,15 +84,15 @@ class ModeParameter : public classbase
|
|||||||
|
|
||||||
/** Holds a complete ban list
|
/** Holds a complete ban list
|
||||||
*/
|
*/
|
||||||
typedef std::vector<BanItem, __single_client_alloc> BanList;
|
typedef std::vector<BanItem> BanList;
|
||||||
|
|
||||||
/** Holds a complete exempt list
|
/** Holds a complete exempt list
|
||||||
*/
|
*/
|
||||||
typedef std::vector<ExemptItem, __single_client_alloc> ExemptList;
|
typedef std::vector<ExemptItem> ExemptList;
|
||||||
|
|
||||||
/** Holds a complete invite list
|
/** Holds a complete invite list
|
||||||
*/
|
*/
|
||||||
typedef std::vector<InviteItem, __single_client_alloc> InviteList;
|
typedef std::vector<InviteItem> InviteList;
|
||||||
|
|
||||||
/** Holds all relevent information for a channel.
|
/** Holds all relevent information for a channel.
|
||||||
* This class represents a channel, and contains its name, modes, time created, topic, topic set time,
|
* This class represents a channel, and contains its name, modes, time created, topic, topic set time,
|
||||||
@ -112,7 +112,7 @@ class chanrec : public Extensible
|
|||||||
/** User list (casted to char*'s to stop forward declaration stuff)
|
/** User list (casted to char*'s to stop forward declaration stuff)
|
||||||
* (chicken and egg scenario!)
|
* (chicken and egg scenario!)
|
||||||
*/
|
*/
|
||||||
std::vector<char*, __single_client_alloc> internal_userlist;
|
std::vector<char*> internal_userlist;
|
||||||
|
|
||||||
/** Channel topic.
|
/** Channel topic.
|
||||||
* If this is an empty string, no channel topic is set.
|
* If this is an empty string, no channel topic is set.
|
||||||
@ -196,7 +196,7 @@ class chanrec : public Extensible
|
|||||||
* The resulting pointer to the vector should be considered
|
* The resulting pointer to the vector should be considered
|
||||||
* readonly and only modified via AddUser and DelUser.
|
* readonly and only modified via AddUser and DelUser.
|
||||||
*/
|
*/
|
||||||
std::vector<char*, __single_client_alloc> *GetUsers();
|
std::vector<char*> *GetUsers();
|
||||||
|
|
||||||
/** Creates a channel record and initialises it with default values
|
/** Creates a channel record and initialises it with default values
|
||||||
*/
|
*/
|
||||||
|
@ -110,7 +110,7 @@ class ircd_connector : public Extensible
|
|||||||
* So for A->B->C, if this was the record for B it would contain A and C
|
* So for A->B->C, if this was the record for B it would contain A and C
|
||||||
* whilever both servers are connected to B.
|
* whilever both servers are connected to B.
|
||||||
*/
|
*/
|
||||||
std::vector<std::string, __single_client_alloc> routes;
|
std::vector<std::string> routes;
|
||||||
|
|
||||||
|
|
||||||
/** Create an outbound connection to a listening socket
|
/** Create an outbound connection to a listening socket
|
||||||
@ -273,7 +273,7 @@ class connection : public Extensible
|
|||||||
/** With a serverrec, this is a list of all established server connections.
|
/** With a serverrec, this is a list of all established server connections.
|
||||||
* With a userrec this is unused.
|
* With a userrec this is unused.
|
||||||
*/
|
*/
|
||||||
std::vector<ircd_connector, __single_client_alloc> connectors;
|
std::vector<ircd_connector> connectors;
|
||||||
|
|
||||||
/** Default constructor
|
/** Default constructor
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ typedef file_cache string_list;
|
|||||||
|
|
||||||
/** Holds a list of users in a channel
|
/** Holds a list of users in a channel
|
||||||
*/
|
*/
|
||||||
typedef std::deque<userrec*, __single_client_alloc> chanuserlist;
|
typedef std::deque<userrec*> chanuserlist;
|
||||||
|
|
||||||
|
|
||||||
// This #define allows us to call a method in all
|
// This #define allows us to call a method in all
|
||||||
|
@ -91,13 +91,13 @@ class ConnectClass : public classbase
|
|||||||
|
|
||||||
/** Holds a complete list of all channels to which a user has been invited and has not yet joined.
|
/** Holds a complete list of all channels to which a user has been invited and has not yet joined.
|
||||||
*/
|
*/
|
||||||
typedef std::vector<Invited, __single_client_alloc> InvitedList;
|
typedef std::vector<Invited> InvitedList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Holds a complete list of all allow and deny tags from the configuration file (connection classes)
|
/** Holds a complete list of all allow and deny tags from the configuration file (connection classes)
|
||||||
*/
|
*/
|
||||||
typedef std::vector<ConnectClass, __single_client_alloc> ClassVector;
|
typedef std::vector<ConnectClass> ClassVector;
|
||||||
|
|
||||||
/** Holds all information about a user
|
/** Holds all information about a user
|
||||||
* This class stores all information about a user connected to the irc server. Everything about a
|
* This class stores all information about a user connected to the irc server. Everything about a
|
||||||
|
@ -56,8 +56,8 @@ using namespace std;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
|
|
||||||
extern int LogLevel;
|
extern int LogLevel;
|
||||||
extern char ServerName[MAXBUF];
|
extern char ServerName[MAXBUF];
|
||||||
@ -83,7 +83,7 @@ extern int NetBufferSize;
|
|||||||
int MaxWhoResults;
|
int MaxWhoResults;
|
||||||
extern time_t nb_start;
|
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 boundPortCount;
|
||||||
extern int portCount;
|
extern int portCount;
|
||||||
@ -102,7 +102,7 @@ extern time_t TIME;
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
std::vector<ModeParameter, __single_client_alloc> custom_mode_params;
|
std::vector<ModeParameter> custom_mode_params;
|
||||||
|
|
||||||
chanrec::chanrec()
|
chanrec::chanrec()
|
||||||
{
|
{
|
||||||
@ -158,7 +158,7 @@ void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on)
|
|||||||
{
|
{
|
||||||
if (custom_mode_params.size())
|
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)))
|
if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
|
||||||
{
|
{
|
||||||
@ -182,7 +182,7 @@ std::string chanrec::GetModeParameter(char mode)
|
|||||||
{
|
{
|
||||||
if (custom_mode_params.size())
|
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)))
|
if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
|
||||||
{
|
{
|
||||||
@ -206,7 +206,7 @@ void chanrec::AddUser(char* castuser)
|
|||||||
|
|
||||||
void chanrec::DelUser(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)
|
if (*a == castuser)
|
||||||
{
|
{
|
||||||
@ -218,7 +218,7 @@ void chanrec::DelUser(char* castuser)
|
|||||||
log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
|
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;
|
return &internal_userlist;
|
||||||
}
|
}
|
||||||
|
@ -69,8 +69,8 @@ extern int kq;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
|
|
||||||
extern int LogLevel;
|
extern int LogLevel;
|
||||||
extern char ServerName[MAXBUF];
|
extern char ServerName[MAXBUF];
|
||||||
@ -100,7 +100,7 @@ extern bool nofork;
|
|||||||
|
|
||||||
extern time_t TIME;
|
extern time_t TIME;
|
||||||
|
|
||||||
extern std::vector<std::string, __single_client_alloc> module_names;
|
extern std::vector<std::string> module_names;
|
||||||
|
|
||||||
extern char MyExecutable[1024];
|
extern char MyExecutable[1024];
|
||||||
extern int boundPortCount;
|
extern int boundPortCount;
|
||||||
@ -124,11 +124,11 @@ const long duration_d = duration_h * 24;
|
|||||||
const long duration_w = duration_d * 7;
|
const long duration_w = duration_d * 7;
|
||||||
const long duration_y = duration_w * 52;
|
const long duration_y = duration_w * 52;
|
||||||
|
|
||||||
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
|
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
|
||||||
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
|
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
|
||||||
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
|
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
|
||||||
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
|
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
|
||||||
typedef std::deque<command_t, __single_client_alloc> command_table;
|
typedef std::deque<command_t> command_table;
|
||||||
|
|
||||||
|
|
||||||
extern user_hash clientlist;
|
extern user_hash clientlist;
|
||||||
@ -139,7 +139,7 @@ extern file_cache MOTD;
|
|||||||
extern file_cache RULES;
|
extern file_cache RULES;
|
||||||
extern address_cache IP;
|
extern address_cache IP;
|
||||||
|
|
||||||
extern std::vector<userrec*, __single_client_alloc> all_opers;
|
extern std::vector<userrec*> all_opers;
|
||||||
|
|
||||||
// This table references users by file descriptor.
|
// This table references users by file descriptor.
|
||||||
// its an array to make it VERY fast, as all lookups are referenced
|
// its an array to make it VERY fast, as all lookups are referenced
|
||||||
@ -1033,7 +1033,7 @@ void handle_who(char **parameters, int pcnt, userrec *user)
|
|||||||
{
|
{
|
||||||
if ((!strcmp(parameters[0],"0")) || (!strcmp(parameters[0],"*")) && (!strcmp(parameters[1],"o")))
|
if ((!strcmp(parameters[0],"0")) || (!strcmp(parameters[0],"*")) && (!strcmp(parameters[1],"o")))
|
||||||
{
|
{
|
||||||
for (std::vector<userrec*, __single_client_alloc>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
|
for (std::vector<userrec*>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
|
||||||
{
|
{
|
||||||
// If i were a rich man.. I wouldn't need to me making these bugfixes..
|
// If i were a rich man.. I wouldn't need to me making these bugfixes..
|
||||||
// But i'm a poor bastard with nothing better to do.
|
// But i'm a poor bastard with nothing better to do.
|
||||||
@ -2575,7 +2575,7 @@ void handle_amp(char token,char* params,serverrec* source,serverrec* reply, char
|
|||||||
{
|
{
|
||||||
if (me[i] != NULL)
|
if (me[i] != NULL)
|
||||||
{
|
{
|
||||||
for (vector<ircd_connector, __single_client_alloc>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
for (vector<ircd_connector>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(j->GetServerName().c_str(),params))
|
if (!strcasecmp(j->GetServerName().c_str(),params))
|
||||||
{
|
{
|
||||||
|
@ -33,10 +33,10 @@ using namespace std;
|
|||||||
#include "helperfuncs.h"
|
#include "helperfuncs.h"
|
||||||
|
|
||||||
|
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
|
|
||||||
std::deque<std::string, __single_client_alloc> xsums;
|
std::deque<std::string> xsums;
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
|
|
||||||
|
@ -65,18 +65,17 @@ using namespace std;
|
|||||||
|
|
||||||
extern int MaxWhoResults;
|
extern int MaxWhoResults;
|
||||||
|
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<std::string, __single_client_alloc> module_names;
|
extern std::vector<std::string> module_names;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
extern std::vector<int, __single_client_alloc> fd_reap;
|
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
|
|
||||||
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
|
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
|
||||||
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
|
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
|
||||||
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
|
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
|
||||||
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
|
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
|
||||||
typedef std::deque<command_t, __single_client_alloc> command_table;
|
typedef std::deque<command_t> command_table;
|
||||||
|
|
||||||
extern user_hash clientlist;
|
extern user_hash clientlist;
|
||||||
extern chan_hash chanlist;
|
extern chan_hash chanlist;
|
||||||
|
@ -51,7 +51,7 @@ using namespace std;
|
|||||||
#include "hashcomp.h"
|
#include "hashcomp.h"
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
|
|
||||||
extern time_t TIME;
|
extern time_t TIME;
|
||||||
extern bool nofork;
|
extern bool nofork;
|
||||||
@ -74,13 +74,13 @@ extern userrec* fd_ref_table[65536];
|
|||||||
extern int statsAccept, statsRefused, statsUnknown, statsCollisions, statsDns, statsDnsGood, statsDnsBad, statsConnects, statsSent, statsRecv;
|
extern int statsAccept, statsRefused, statsUnknown, statsCollisions, statsDns, statsDnsGood, statsDnsBad, statsConnects, statsSent, statsRecv;
|
||||||
|
|
||||||
static char already_sent[65536];
|
static char already_sent[65536];
|
||||||
extern std::vector<userrec*, __single_client_alloc> all_opers;
|
extern std::vector<userrec*> all_opers;
|
||||||
|
|
||||||
extern ClassVector Classes;
|
extern ClassVector Classes;
|
||||||
|
|
||||||
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
|
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
|
||||||
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
|
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
|
||||||
typedef std::deque<command_t, __single_client_alloc> command_table;
|
typedef std::deque<command_t> command_table;
|
||||||
|
|
||||||
extern user_hash clientlist;
|
extern user_hash clientlist;
|
||||||
extern chan_hash chanlist;
|
extern chan_hash chanlist;
|
||||||
@ -283,7 +283,7 @@ void WriteChannel(chanrec* Ptr, userrec* user, char* text, ...)
|
|||||||
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
||||||
va_end(argsPtr);
|
va_end(argsPtr);
|
||||||
|
|
||||||
std::vector<char*, __single_client_alloc> *ulist = Ptr->GetUsers();
|
std::vector<char*> *ulist = Ptr->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -310,7 +310,7 @@ void WriteChannelLocal(chanrec* Ptr, userrec* user, char* text, ...)
|
|||||||
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
||||||
va_end(argsPtr);
|
va_end(argsPtr);
|
||||||
|
|
||||||
std::vector<char*, __single_client_alloc> *ulist = Ptr->GetUsers();
|
std::vector<char*> *ulist = Ptr->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -343,7 +343,7 @@ void WriteChannelWithServ(char* ServName, chanrec* Ptr, char* text, ...)
|
|||||||
va_end(argsPtr);
|
va_end(argsPtr);
|
||||||
|
|
||||||
|
|
||||||
std::vector<char*, __single_client_alloc> *ulist = Ptr->GetUsers();
|
std::vector<char*> *ulist = Ptr->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -369,7 +369,7 @@ void ChanExceptSender(chanrec* Ptr, userrec* user, char* text, ...)
|
|||||||
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
||||||
va_end(argsPtr);
|
va_end(argsPtr);
|
||||||
|
|
||||||
std::vector<char*, __single_client_alloc> *ulist = Ptr->GetUsers();
|
std::vector<char*> *ulist = Ptr->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -428,7 +428,7 @@ void WriteCommon(userrec *u, char* text, ...)
|
|||||||
{
|
{
|
||||||
if (u->chans[i].channel)
|
if (u->chans[i].channel)
|
||||||
{
|
{
|
||||||
std::vector<char*, __single_client_alloc> *ulist = u->chans[i].channel->GetUsers();
|
std::vector<char*> *ulist = u->chans[i].channel->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -478,7 +478,7 @@ void WriteCommonExcept(userrec *u, char* text, ...)
|
|||||||
{
|
{
|
||||||
if (u->chans[i].channel)
|
if (u->chans[i].channel)
|
||||||
{
|
{
|
||||||
std::vector<char*, __single_client_alloc> *ulist = u->chans[i].channel->GetUsers();
|
std::vector<char*> *ulist = u->chans[i].channel->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -510,7 +510,7 @@ void WriteOpers(char* text, ...)
|
|||||||
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
||||||
va_end(argsPtr);
|
va_end(argsPtr);
|
||||||
|
|
||||||
for (std::vector<userrec*, __single_client_alloc>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
|
for (std::vector<userrec*>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
|
||||||
{
|
{
|
||||||
userrec* a = *i;
|
userrec* a = *i;
|
||||||
if ((a) && (a->fd != FD_MAGIC_NUMBER))
|
if ((a) && (a->fd != FD_MAGIC_NUMBER))
|
||||||
@ -538,7 +538,7 @@ void NoticeAllOpers(userrec *source, bool local_only, char* text, ...)
|
|||||||
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
|
||||||
va_end(argsPtr);
|
va_end(argsPtr);
|
||||||
|
|
||||||
for (std::vector<userrec*,__single_client_alloc>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
|
for (std::vector<userrec*>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
|
||||||
{
|
{
|
||||||
userrec* a = *i;
|
userrec* a = *i;
|
||||||
if ((a) && (a->fd != FD_MAGIC_NUMBER))
|
if ((a) && (a->fd != FD_MAGIC_NUMBER))
|
||||||
@ -564,7 +564,7 @@ bool ChanAnyOnThisServer(chanrec *c,char* servername)
|
|||||||
{
|
{
|
||||||
log(DEBUG,"ChanAnyOnThisServer");
|
log(DEBUG,"ChanAnyOnThisServer");
|
||||||
|
|
||||||
std::vector<char*, __single_client_alloc> *ulist = c->GetUsers();
|
std::vector<char*> *ulist = c->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -585,7 +585,7 @@ bool CommonOnThisServer(userrec* u,const char* servername)
|
|||||||
{
|
{
|
||||||
if (u->chans[i].channel)
|
if (u->chans[i].channel)
|
||||||
{
|
{
|
||||||
std::vector<char*, __single_client_alloc> *ulist = u->chans[i].channel->GetUsers();
|
std::vector<char*> *ulist = u->chans[i].channel->GetUsers();
|
||||||
for (int j = 0; j < ulist->size(); j++)
|
for (int j = 0; j < ulist->size(); j++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[j];
|
char* o = (*ulist)[j];
|
||||||
@ -1102,7 +1102,7 @@ void userlist(userrec *user,chanrec *c)
|
|||||||
|
|
||||||
snprintf(list,MAXBUF,"353 %s = %s :", user->nick, c->name);
|
snprintf(list,MAXBUF,"353 %s = %s :", user->nick, c->name);
|
||||||
|
|
||||||
std::vector<char*, __single_client_alloc> *ulist = c->GetUsers();
|
std::vector<char*> *ulist = c->GetUsers();
|
||||||
for (int i = 0; i < ulist->size(); i++)
|
for (int i = 0; i < ulist->size(); i++)
|
||||||
{
|
{
|
||||||
char* o = (*ulist)[i];
|
char* o = (*ulist)[i];
|
||||||
|
@ -92,9 +92,9 @@ bool AllowHalfop = true;
|
|||||||
bool AllowProtect = true;
|
bool AllowProtect = true;
|
||||||
bool AllowFounder = true;
|
bool AllowFounder = true;
|
||||||
|
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
std::vector<std::string, __single_client_alloc> module_names;
|
std::vector<std::string> module_names;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
int openSockfd[MAXSOCKS];
|
int openSockfd[MAXSOCKS];
|
||||||
@ -107,11 +107,11 @@ time_t TIME = time(NULL), OLDTIME = time(NULL);
|
|||||||
int kq, lkq, skq;
|
int kq, lkq, skq;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
|
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
|
||||||
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
|
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
|
||||||
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
|
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
|
||||||
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
|
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
|
||||||
typedef std::deque<command_t, __single_client_alloc> command_table;
|
typedef std::deque<command_t> command_table;
|
||||||
|
|
||||||
// This table references users by file descriptor.
|
// This table references users by file descriptor.
|
||||||
// its an array to make it VERY fast, as all lookups are referenced
|
// its an array to make it VERY fast, as all lookups are referenced
|
||||||
@ -153,7 +153,7 @@ void AddWhoWas(userrec* u);
|
|||||||
std::vector<long> auth_cookies;
|
std::vector<long> auth_cookies;
|
||||||
std::stringstream config_f(stringstream::in | stringstream::out);
|
std::stringstream config_f(stringstream::in | stringstream::out);
|
||||||
|
|
||||||
std::vector<userrec*, __single_client_alloc> all_opers;
|
std::vector<userrec*> all_opers;
|
||||||
|
|
||||||
char lowermap[255];
|
char lowermap[255];
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ void AddOper(userrec* user)
|
|||||||
|
|
||||||
void DeleteOper(userrec* user)
|
void DeleteOper(userrec* user)
|
||||||
{
|
{
|
||||||
for (std::vector<userrec*, __single_client_alloc>::iterator a = all_opers.begin(); a < all_opers.end(); a++)
|
for (std::vector<userrec*>::iterator a = all_opers.begin(); a < all_opers.end(); a++)
|
||||||
{
|
{
|
||||||
if (*a == user)
|
if (*a == user)
|
||||||
{
|
{
|
||||||
@ -385,10 +385,10 @@ void ReadConfig(bool bail, userrec* user)
|
|||||||
{
|
{
|
||||||
log(DEFAULT,"Adding and removing modules due to rehash...");
|
log(DEFAULT,"Adding and removing modules due to rehash...");
|
||||||
|
|
||||||
std::vector<std::string, __single_client_alloc> old_module_names, new_module_names, added_modules, removed_modules;
|
std::vector<std::string> old_module_names, new_module_names, added_modules, removed_modules;
|
||||||
|
|
||||||
// store the old module names
|
// store the old module names
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator t = module_names.begin(); t != module_names.end(); t++)
|
for (std::vector<std::string>::iterator t = module_names.begin(); t != module_names.end(); t++)
|
||||||
{
|
{
|
||||||
old_module_names.push_back(*t);
|
old_module_names.push_back(*t);
|
||||||
}
|
}
|
||||||
@ -402,10 +402,10 @@ void ReadConfig(bool bail, userrec* user)
|
|||||||
|
|
||||||
// now create a list of new modules that are due to be loaded
|
// now create a list of new modules that are due to be loaded
|
||||||
// and a seperate list of modules which are due to be unloaded
|
// and a seperate list of modules which are due to be unloaded
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator _new = new_module_names.begin(); _new != new_module_names.end(); _new++)
|
for (std::vector<std::string>::iterator _new = new_module_names.begin(); _new != new_module_names.end(); _new++)
|
||||||
{
|
{
|
||||||
bool added = true;
|
bool added = true;
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator old = old_module_names.begin(); old != old_module_names.end(); old++)
|
for (std::vector<std::string>::iterator old = old_module_names.begin(); old != old_module_names.end(); old++)
|
||||||
{
|
{
|
||||||
if (*old == *_new)
|
if (*old == *_new)
|
||||||
added = false;
|
added = false;
|
||||||
@ -413,10 +413,10 @@ void ReadConfig(bool bail, userrec* user)
|
|||||||
if (added)
|
if (added)
|
||||||
added_modules.push_back(*_new);
|
added_modules.push_back(*_new);
|
||||||
}
|
}
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator oldm = old_module_names.begin(); oldm != old_module_names.end(); oldm++)
|
for (std::vector<std::string>::iterator oldm = old_module_names.begin(); oldm != old_module_names.end(); oldm++)
|
||||||
{
|
{
|
||||||
bool removed = true;
|
bool removed = true;
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator newm = new_module_names.begin(); newm != new_module_names.end(); newm++)
|
for (std::vector<std::string>::iterator newm = new_module_names.begin(); newm != new_module_names.end(); newm++)
|
||||||
{
|
{
|
||||||
if (*newm == *oldm)
|
if (*newm == *oldm)
|
||||||
removed = false;
|
removed = false;
|
||||||
@ -428,7 +428,7 @@ void ReadConfig(bool bail, userrec* user)
|
|||||||
// to be removed.
|
// to be removed.
|
||||||
int rem = 0, add = 0;
|
int rem = 0, add = 0;
|
||||||
if (!removed_modules.empty())
|
if (!removed_modules.empty())
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++)
|
for (std::vector<std::string>::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++)
|
||||||
{
|
{
|
||||||
if (UnloadModule(removing->c_str()))
|
if (UnloadModule(removing->c_str()))
|
||||||
{
|
{
|
||||||
@ -442,7 +442,7 @@ void ReadConfig(bool bail, userrec* user)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!added_modules.empty())
|
if (!added_modules.empty())
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator adding = added_modules.begin(); adding != added_modules.end(); adding++)
|
for (std::vector<std::string>::iterator adding = added_modules.begin(); adding != added_modules.end(); adding++)
|
||||||
{
|
{
|
||||||
if (LoadModule(adding->c_str()))
|
if (LoadModule(adding->c_str()))
|
||||||
{
|
{
|
||||||
@ -1668,7 +1668,7 @@ void DoSplitEveryone()
|
|||||||
{
|
{
|
||||||
if (me[i] != NULL)
|
if (me[i] != NULL)
|
||||||
{
|
{
|
||||||
for (vector<ircd_connector, __single_client_alloc>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
for (vector<ircd_connector>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
||||||
{
|
{
|
||||||
if (strcasecmp(j->GetServerName().c_str(),ServerName))
|
if (strcasecmp(j->GetServerName().c_str(),ServerName))
|
||||||
{
|
{
|
||||||
@ -2267,7 +2267,7 @@ void DoSplit(const char* params)
|
|||||||
{
|
{
|
||||||
if (me[i] != NULL)
|
if (me[i] != NULL)
|
||||||
{
|
{
|
||||||
for (vector<ircd_connector, __single_client_alloc>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
for (vector<ircd_connector>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(j->GetServerName().c_str(),params))
|
if (!strcasecmp(j->GetServerName().c_str(),params))
|
||||||
{
|
{
|
||||||
@ -2315,7 +2315,7 @@ void RemoveServer(const char* name)
|
|||||||
{
|
{
|
||||||
if (me[i] != NULL)
|
if (me[i] != NULL)
|
||||||
{
|
{
|
||||||
for (vector<ircd_connector, __single_client_alloc>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
for (vector<ircd_connector>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(j->GetServerName().c_str(),name))
|
if (!strcasecmp(j->GetServerName().c_str(),name))
|
||||||
{
|
{
|
||||||
@ -2342,7 +2342,7 @@ char* ModuleError()
|
|||||||
void erase_factory(int j)
|
void erase_factory(int j)
|
||||||
{
|
{
|
||||||
int v = 0;
|
int v = 0;
|
||||||
for (std::vector<ircd_module*, __single_client_alloc>::iterator t = factory.begin(); t != factory.end(); t++)
|
for (std::vector<ircd_module*>::iterator t = factory.begin(); t != factory.end(); t++)
|
||||||
{
|
{
|
||||||
if (v == j)
|
if (v == j)
|
||||||
{
|
{
|
||||||
@ -2357,7 +2357,7 @@ void erase_factory(int j)
|
|||||||
void erase_module(int j)
|
void erase_module(int j)
|
||||||
{
|
{
|
||||||
int v1 = 0;
|
int v1 = 0;
|
||||||
for (std::vector<Module*, __single_client_alloc>::iterator m = modules.begin(); m!= modules.end(); m++)
|
for (std::vector<Module*>::iterator m = modules.begin(); m!= modules.end(); m++)
|
||||||
{
|
{
|
||||||
if (v1 == j)
|
if (v1 == j)
|
||||||
{
|
{
|
||||||
@ -2369,7 +2369,7 @@ void erase_module(int j)
|
|||||||
v1++;
|
v1++;
|
||||||
}
|
}
|
||||||
int v2 = 0;
|
int v2 = 0;
|
||||||
for (std::vector<std::string, __single_client_alloc>::iterator v = module_names.begin(); v != module_names.end(); v++)
|
for (std::vector<std::string>::iterator v = module_names.begin(); v != module_names.end(); v++)
|
||||||
{
|
{
|
||||||
if (v2 == j)
|
if (v2 == j)
|
||||||
{
|
{
|
||||||
|
@ -49,8 +49,8 @@ using namespace std;
|
|||||||
#include "helperfuncs.h"
|
#include "helperfuncs.h"
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
|
|
||||||
extern char ServerName[MAXBUF];
|
extern char ServerName[MAXBUF];
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ using namespace std;
|
|||||||
#include "helperfuncs.h"
|
#include "helperfuncs.h"
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
extern std::vector<std::string, __single_client_alloc> module_names;
|
extern std::vector<std::string> module_names;
|
||||||
|
|
||||||
|
|
||||||
extern int LogLevel;
|
extern int LogLevel;
|
||||||
|
@ -59,8 +59,8 @@ extern int kq;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
|
|
||||||
extern time_t TIME;
|
extern time_t TIME;
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ extern int NetBufferSize;
|
|||||||
extern int MaxWhoResults;
|
extern int MaxWhoResults;
|
||||||
extern time_t nb_start;
|
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 boundPortCount;
|
||||||
extern int portCount;
|
extern int portCount;
|
||||||
@ -105,11 +105,11 @@ extern FILE *log_file;
|
|||||||
|
|
||||||
extern userrec* fd_ref_table[65536];
|
extern userrec* fd_ref_table[65536];
|
||||||
|
|
||||||
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
|
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
|
||||||
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
|
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
|
||||||
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
|
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
|
||||||
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
|
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
|
||||||
typedef std::deque<command_t, __single_client_alloc> command_table;
|
typedef std::deque<command_t> command_table;
|
||||||
|
|
||||||
|
|
||||||
extern user_hash clientlist;
|
extern user_hash clientlist;
|
||||||
@ -135,7 +135,7 @@ public:
|
|||||||
ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
|
ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<ExtMode, __single_client_alloc> ExtModeList;
|
typedef std::vector<ExtMode> ExtModeList;
|
||||||
typedef ExtModeList::iterator ExtModeListIter;
|
typedef ExtModeList::iterator ExtModeListIter;
|
||||||
|
|
||||||
|
|
||||||
@ -391,8 +391,8 @@ chanuserlist Server::GetUsers(chanrec* chan)
|
|||||||
{
|
{
|
||||||
chanuserlist userl;
|
chanuserlist userl;
|
||||||
userl.clear();
|
userl.clear();
|
||||||
std::vector<char*, __single_client_alloc> *list = chan->GetUsers();
|
std::vector<char*> *list = chan->GetUsers();
|
||||||
for (std::vector<char*, __single_client_alloc>::iterator i = list->begin(); i != list->end(); i++)
|
for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
|
||||||
{
|
{
|
||||||
char* o = *i;
|
char* o = *i;
|
||||||
userl.push_back((userrec*)o);
|
userl.push_back((userrec*)o);
|
||||||
@ -989,8 +989,8 @@ int FileReader::FileSize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<Module*, __single_client_alloc> modules(255);
|
std::vector<Module*> modules(255);
|
||||||
std::vector<ircd_module*, __single_client_alloc> factory(255);
|
std::vector<ircd_module*> factory(255);
|
||||||
|
|
||||||
int MODCOUNT = -1;
|
int MODCOUNT = -1;
|
||||||
|
|
||||||
|
@ -50,8 +50,8 @@ using namespace std;
|
|||||||
#include "hashcomp.h"
|
#include "hashcomp.h"
|
||||||
|
|
||||||
extern int MODCOUNT;
|
extern int MODCOUNT;
|
||||||
extern std::vector<Module*, __single_client_alloc> modules;
|
extern std::vector<Module*> modules;
|
||||||
extern std::vector<ircd_module*, __single_client_alloc> factory;
|
extern std::vector<ircd_module*> factory;
|
||||||
|
|
||||||
extern int LogLevel;
|
extern int LogLevel;
|
||||||
extern char ServerName[MAXBUF];
|
extern char ServerName[MAXBUF];
|
||||||
@ -76,7 +76,7 @@ extern time_t startup_time;
|
|||||||
extern int NetBufferSize;
|
extern int NetBufferSize;
|
||||||
extern time_t nb_start;
|
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 boundPortCount;
|
||||||
extern int portCount;
|
extern int portCount;
|
||||||
@ -91,11 +91,11 @@ extern serverrec* me[32];
|
|||||||
|
|
||||||
extern FILE *log_file;
|
extern FILE *log_file;
|
||||||
|
|
||||||
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
|
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
|
||||||
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
|
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
|
||||||
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
|
typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
|
||||||
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
|
typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
|
||||||
typedef std::deque<command_t, __single_client_alloc> command_table;
|
typedef std::deque<command_t> command_table;
|
||||||
|
|
||||||
|
|
||||||
extern user_hash clientlist;
|
extern user_hash clientlist;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user