summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/typedefs.h25
-rw-r--r--src/commands.cpp5
-rw-r--r--src/helperfuncs.cpp5
-rw-r--r--src/inspircd.cpp5
-rw-r--r--src/modules.cpp6
-rw-r--r--src/modules/m_spanningtree.cpp5
-rw-r--r--src/userprocess.cpp5
-rw-r--r--src/xline.cpp3
8 files changed, 45 insertions, 14 deletions
diff --git a/include/typedefs.h b/include/typedefs.h
new file mode 100644
index 000000000..39876207d
--- /dev/null
+++ b/include/typedefs.h
@@ -0,0 +1,25 @@
+#ifndef __TYPEDEF_H__
+#define __TYPEDEF_H__
+
+#include "users.h"
+#include "channels.h"
+#include "hashcomp.h"
+#include "inspstring.h"
+#include "ctables.h"
+#include "inspircd.h"
+#include "inspircd_config.h"
+#include <string>
+#ifdef GCC3
+#include <ext/hash_map>
+#else
+#include <hash_map>
+#endif
+
+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> chan_hash;
+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> whowas_hash;
+typedef std::deque<command_t> command_table;
+typedef std::vector<std::string> servernamelist;
+
+#endif
diff --git a/src/commands.cpp b/src/commands.cpp
index 25cfab93a..498760524 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -61,6 +61,7 @@ using namespace std;
#include "helperfuncs.h"
#include "hashcomp.h"
#include "socketengine.h"
+#include "typedefs.h"
extern SocketEngine* SE;
extern ServerConfig* Config;
@@ -86,11 +87,11 @@ const long duration_d = duration_h * 24;
const long duration_w = duration_d * 7;
const long duration_y = duration_w * 52;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> 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> chan_hash;
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> whowas_hash;
-typedef std::deque<command_t> command_table;
+typedef std::deque<command_t> command_table;*/
extern user_hash clientlist;
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 75d4b1692..6bede19a4 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -48,6 +48,7 @@ using namespace std;
#include "inspstring.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "typedefs.h"
extern int MODCOUNT;
extern std::vector<Module*> modules;
@@ -66,9 +67,9 @@ extern std::vector<userrec*> all_opers;
extern ClassVector Classes;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> 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> chan_hash;
-typedef std::deque<command_t> command_table;
+typedef std::deque<command_t> command_table;*/
extern user_hash clientlist;
extern chan_hash chanlist;
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 873e48a22..582eac7b8 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -60,6 +60,7 @@ using namespace std;
#include "userprocess.h"
#include "socket.h"
#include "dns.h"
+#include "typedefs.h"
int WHOWAS_STALE = 48; // default WHOWAS Entries last 2 days before they go 'stale'
int WHOWAS_MAX = 100; // default 100 people maximum in the WHOWAS list
@@ -85,12 +86,12 @@ SocketEngine* SE = NULL;
extern std::vector<std::string> include_stack;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> 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> chan_hash;
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> whowas_hash;
typedef std::deque<command_t> command_table;
-typedef std::vector<std::string> servernamelist;
+typedef std::vector<std::string> servernamelist;*/
// This table references users by file descriptor.
// its an array to make it VERY fast, as all lookups are referenced
diff --git a/src/modules.cpp b/src/modules.cpp
index 5799289ef..00bdf9b0f 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -48,6 +48,7 @@ using namespace std;
#include "hashcomp.h"
#include "socket.h"
#include "socketengine.h"
+#include "typedefs.h"
extern SocketEngine* SE;
extern ServerConfig *Config;
@@ -71,12 +72,11 @@ class Server;
extern std::stringstream config_f;
extern userrec* fd_ref_table[65536];
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> 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> chan_hash;
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> whowas_hash;
-typedef std::deque<command_t> command_table;
-
+typedef std::deque<command_t> command_table;*/
extern user_hash clientlist;
extern chan_hash chanlist;
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 4c4562728..1ef31221e 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -39,6 +39,7 @@ using namespace std;
#include "hashcomp.h"
#include "message.h"
#include "xline.h"
+#include "typedefs.h"
#ifdef GCC3
#define nspace __gnu_cxx
@@ -92,8 +93,8 @@ extern int MODCOUNT;
enum ServerState { LISTENER, CONNECTING, WAIT_AUTH_1, WAIT_AUTH_2, CONNECTED };
/* We need to import these from the core for use in netbursts */
-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> chan_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> chan_hash;*/
extern user_hash clientlist;
extern chan_hash chanlist;
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 2e3c8713d..37e0153e5 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -57,6 +57,7 @@ using namespace std;
#include "helperfuncs.h"
#include "hashcomp.h"
#include "socketengine.h"
+#include "typedefs.h"
extern int MODCOUNT;
extern int openSockfd[MAXSOCKS];
@@ -77,10 +78,10 @@ extern ServerConfig *Config;
extern userrec* fd_ref_table[65536];
char data[65536];
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> 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> chan_hash;
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> whowas_hash;
+typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;*/
extern user_hash clientlist;
extern chan_hash chanlist;
diff --git a/src/xline.cpp b/src/xline.cpp
index 0e0ed9257..52648d1d1 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -46,13 +46,14 @@ using namespace std;
#include "inspstring.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "typedefs.h"
extern int MODCOUNT;
extern std::vector<Module*> modules;
extern std::vector<ircd_module*> factory;
extern ServerConfig* Config;
extern std::stringstream config_f;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
+/*typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;*/
extern user_hash clientlist;
/* Version two, now with optimized expiry!