1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 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 "socketengine.h"
47 #include "command_parse.h"
58 #define ETIREDGERBILS EAGAIN
61 flags for use with WriteMode
66 flags for use with OnUserPreMessage and OnUserPreNotice
69 #define TYPE_CHANNEL 2
72 #define IS_LOCAL(x) (x->fd > -1)
73 #define IS_REMOTE(x) (x->fd < 0)
74 #define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER)
94 statsAccept = statsRefused = statsUnknown = 0;
95 statsCollisions = statsDns = statsDnsGood = 0;
96 statsDnsBad = statsConnects = statsSent = statsRecv = 0;
107 void erase_factory(int j);
108 void erase_module(int j);
109 void BuildISupport();
110 void MoveTo(std::string modulename,int slot);
115 ModeParser* ModeGrok;
116 CommandParser* Parser;
121 std::string GetRevision();
122 std::string GetVersionString();
124 bool LoadModule(const char* filename);
125 bool UnloadModule(const char* filename);
126 void MoveToLast(std::string modulename);
127 void MoveToFirst(std::string modulename);
128 void MoveAfter(std::string modulename, std::string after);
129 void MoveBefore(std::string modulename, std::string before);
130 InspIRCd(int argc, char** argv);
131 void DoOneIteration(bool process_module_sockets);
136 /* userrec optimization stuff */
137 void AddServerName(std::string servername);
138 const char* FindServerNamePtr(std::string servername);
139 bool FindServerName(std::string servername);