diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-15 04:21:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-15 04:21:31 +0000 |
commit | c4a230243f93709bd9e3629ce6c9c84da0f9c31f (patch) | |
tree | e6bd7a4e9d5014fa466f49694ebd4668adbce722 /src | |
parent | 7155b085f7701669ec87e411383ee6348d7e064b (diff) |
sorted hashcomp etc
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1387 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 6 | ||||
-rw-r--r-- | src/commands.cpp | 5 | ||||
-rw-r--r-- | src/dnsqueue.cpp | 10 | ||||
-rw-r--r-- | src/hashcomp.cpp | 16 | ||||
-rw-r--r-- | src/helperfuncs.cpp | 74 | ||||
-rw-r--r-- | src/inspircd.cpp | 4 | ||||
-rw-r--r-- | src/message.cpp | 6 | ||||
-rw-r--r-- | src/mode.cpp | 8 | ||||
-rw-r--r-- | src/modules.cpp | 8 | ||||
-rw-r--r-- | src/xline.cpp | 7 |
10 files changed, 35 insertions, 109 deletions
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" |