summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/hashcomp.h16
-rw-r--r--include/helperfuncs.h16
-rw-r--r--include/inspircd.h6
-rw-r--r--src/channels.cpp6
-rw-r--r--src/commands.cpp5
-rw-r--r--src/dnsqueue.cpp10
-rw-r--r--src/hashcomp.cpp16
-rw-r--r--src/helperfuncs.cpp74
-rw-r--r--src/inspircd.cpp4
-rw-r--r--src/message.cpp6
-rw-r--r--src/mode.cpp8
-rw-r--r--src/modules.cpp8
-rw-r--r--src/xline.cpp7
13 files changed, 67 insertions, 115 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 42954fc37..e75e84ef4 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -1,3 +1,19 @@
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
+ *
+ * Written by Craig Edwards, Craig McLure, and others.
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
#ifndef _HASHCOMP_H_
#define _HASHCOMP_H_
diff --git a/include/helperfuncs.h b/include/helperfuncs.h
index b7078f56a..0e8ba33ff 100644
--- a/include/helperfuncs.h
+++ b/include/helperfuncs.h
@@ -1,3 +1,19 @@
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
+ *
+ * Written by Craig Edwards, Craig McLure, and others.
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
#ifndef _HELPER_H_
#define _HELPER_H_
diff --git a/include/inspircd.h b/include/inspircd.h
index 27c90cce8..6cd4c6350 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -16,18 +16,12 @@
#include <string>
#include <stdio.h>
-#include <syslog.h>
-#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <netdb.h>
#include <string.h>
-#include <ctype.h>
#include <errno.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <sys/param.h>
#include <sys/types.h>
#ifndef _LINUX_C_LIB_VERSION
diff --git a/src/channels.cpp b/src/channels.cpp
index b8ad3d95a..1904bfa26 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -19,11 +19,9 @@
#include "inspircd_util.h"
#include "inspircd_config.h"
#include <unistd.h>
-#include <fcntl.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
-#include <cstdio>
#include <time.h>
#include <string>
#ifdef GCC3
@@ -34,11 +32,7 @@
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
diff --git a/src/commands.cpp b/src/commands.cpp
index e327aa712..3dfa44d9f 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -19,7 +19,6 @@
#include "inspircd_util.h"
#include "inspircd_config.h"
#include <unistd.h>
-#include <fcntl.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
@@ -39,11 +38,7 @@
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
diff --git a/src/dnsqueue.cpp b/src/dnsqueue.cpp
index 2198d0bed..9d77543e9 100644
--- a/src/dnsqueue.cpp
+++ b/src/dnsqueue.cpp
@@ -23,7 +23,6 @@ using namespace std;
#include "inspircd_util.h"
#include "inspircd_config.h"
#include <unistd.h>
-#include <fcntl.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
@@ -38,11 +37,7 @@ using namespace std;
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
@@ -57,7 +52,6 @@ using namespace std;
#include "xline.h"
#include "inspstring.h"
#include "dnsqueue.h"
-#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -65,10 +59,6 @@ using namespace std;
#include <sys/time.h>
#include <netinet/in.h>
#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <fcntl.h>
#include "dns.h"
#include "helperfuncs.h"
#include "hashcomp.h"
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index e8ab857f6..1122c3867 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -1,3 +1,19 @@
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
+ *
+ * Written by Craig Edwards, Craig McLure, and others.
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
#include <string>
#include "inspircd.h"
#include "hashcomp.h"
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 98e26ff69..20b924013 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1,3 +1,19 @@
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
+ *
+ * Written by Craig Edwards, Craig McLure, and others.
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
#include "inspircd.h"
#include "inspircd_io.h"
#include "inspircd_util.h"
@@ -5,14 +21,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/utsname.h>
-#ifdef USE_KQUEUE
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/time.h>
-#endif
-#include <cstdio>
#include <time.h>
#include <string>
#ifdef GCC3
@@ -20,14 +28,10 @@
#else
#include <hash_map>
#endif
-#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
+#include <stdarg.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
@@ -46,54 +50,20 @@
using namespace std;
-#ifdef USE_KQUEUE
-extern int kq;
-#endif
-
extern int MODCOUNT;
extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
extern time_t TIME;
-
extern bool nofork;
-
extern char lowermap[255];
-
-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 int WHOWAS_STALE;
-extern int WHOWAS_MAX;
-extern int DieDelay;
-extern time_t startup_time;
-extern int NetBufferSize;
-extern int MaxWhoResults;
-extern time_t nb_start;
-
-extern std::vector<int> fd_reap;
-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 int LogLevel;
+
extern std::stringstream config_f;
extern serverrec* me[32];
@@ -108,21 +78,15 @@ extern std::vector<userrec*> all_opers;
extern ClassVector Classes;
-
typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, StrHashComp> user_hash;
typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, StrHashComp> chan_hash;
-typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, InAddr_HashComp> address_cache;
-typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, StrHashComp> whowas_hash;
typedef std::deque<command_t> command_table;
-
extern user_hash clientlist;
extern chan_hash chanlist;
-extern whowas_hash whowas;
extern command_table cmdlist;
extern file_cache MOTD;
extern file_cache RULES;
-extern address_cache IP;
void log(int level,char *text, ...)
{
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 9a71c3a92..56d476c48 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -32,7 +32,6 @@ using namespace std;
#include <sys/event.h>
#include <sys/time.h>
#endif
-#include <cstdio>
#include <time.h>
#include <string>
#ifdef GCC3
@@ -43,10 +42,7 @@ using namespace std;
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
#include <sched.h>
#include "connection.h"
#include "users.h"
diff --git a/src/message.cpp b/src/message.cpp
index 7cf64a757..1aeee4ae4 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -21,9 +21,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/errno.h>
-#include <sys/ioctl.h>
#include <sys/utsname.h>
-#include <cstdio>
#include <time.h>
#include <string>
#ifdef GCC3
@@ -34,11 +32,7 @@
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
diff --git a/src/mode.cpp b/src/mode.cpp
index 990c6e591..9af80bb00 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -19,11 +19,7 @@
#include "inspircd_util.h"
#include "inspircd_config.h"
#include <unistd.h>
-#include <fcntl.h>
#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/utsname.h>
-#include <cstdio>
#include <time.h>
#include <string>
#ifdef GCC3
@@ -34,11 +30,7 @@
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
diff --git a/src/modules.cpp b/src/modules.cpp
index 731bff6b9..fba0db10a 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -19,16 +19,12 @@
#include "inspircd_util.h"
#include "inspircd_config.h"
#include <unistd.h>
-#include <fcntl.h>
#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/utsname.h>
#ifdef USE_KQUEUE
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#endif
-#include <cstdio>
#include <time.h>
#include <string>
#ifdef GCC3
@@ -39,11 +35,7 @@
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
diff --git a/src/xline.cpp b/src/xline.cpp
index 768950e15..1d0bcf775 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -21,9 +21,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/utsname.h>
-#include <cstdio>
#include <time.h>
#include <string>
#ifdef GCC3
@@ -34,11 +31,7 @@
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <errno.h>
-#include <unistd.h>
-#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"