1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
17 #ifndef __INSPIRCD_H__
18 #define __INSPIRCD_H__
20 #include "inspircd_config.h"
29 #include <sys/types.h>
31 #ifndef _LINUX_C_LIB_VERSION
32 #include <sys/socket.h>
34 #include <netinet/in.h>
37 #include <arpa/inet.h>
41 #include "inspircd_io.h"
46 #include "command_parse.h"
56 // flags for use with WriteMode
61 // flags for use with OnUserPreMessage and OnUserPreNotice
64 #define TYPE_CHANNEL 2
67 #define IS_LOCAL(x) (x->fd > -1)
68 #define IS_REMOTE(x) (x->fd < 0)
69 #define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER)
71 typedef void (handlerfunc) (char**, int, userrec*);
90 statsAccept = statsRefused = statsUnknown = 0;
91 statsCollisions = statsDns = statsDnsGood = 0;
92 statsDnsBad = statsConnects = statsSent = statsRecv = 0;
103 void erase_factory(int j);
104 void erase_module(int j);
108 ModeParser* ModeGrok;
109 CommandParser* Parser;
111 std::string GetRevision();
112 std::string GetVersionString();
114 bool LoadModule(const char* filename);
115 bool UnloadModule(const char* filename);
116 InspIRCd(int argc, char** argv);
121 /* userrec optimization stuff */
122 void AddServerName(std::string servername);
123 const char* FindServerNamePtr(std::string servername);