]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/inspircd.h
100b473343cade62b44d9047b778da1f6e62842e
[user/henk/code/inspircd.git] / include / inspircd.h
1 /*
2
3
4 */
5
6
7 #include <string>
8 #include <stdio.h>
9 #include <syslog.h>
10 #include <stdlib.h>
11 #include <unistd.h>
12 #include <signal.h>
13 #include <time.h>
14 #include <netdb.h>
15 #include <string.h>
16 #include <ctype.h>
17 #include <errno.h>
18 #include <stdarg.h>
19 #include <assert.h>
20 #include <sys/param.h>
21 #include <sys/types.h>
22 #ifndef _LINUX_C_LIB_VERSION
23 #include <sys/socket.h>
24 #include <sys/stat.h>
25 #include <netinet/in.h>
26 #endif
27 #include <arpa/inet.h>
28 #include <string>
29 #include <deque>
30
31 #include "inspircd_config.h"
32 #include "inspircd_io.h"
33 #include "inspircd_util.h"
34 #include "users.h"
35 #include "channels.h"
36
37 #define ERROR -1
38 #define TRUE 1
39 #define FALSE 0
40 #define IDENTMAX 9
41 /* max sockets we can open */
42 #define MAXSOCKS 64
43
44 typedef deque<string> file_cache;
45
46 /* prototypes */
47 int InspIRCd(void);
48 int InitConfig(void);
49 void Error(int status);
50 void send_error(char *s);
51 void ReadConfig(void);
52 void strlower(char *n);
53
54 void WriteOpers(char* text, ...);
55 void debug(char *text, ...);
56 void Write(int sock,char *text, ...);
57 void WriteServ(int sock, char* text, ...);
58 void WriteFrom(int sock, userrec *user,char* text, ...);
59 void WriteTo(userrec *source, userrec *dest,char *data, ...);
60 void WriteChannel(chanrec* Ptr, userrec* user, char* text, ...);
61 void ChanExceptSender(chanrec* Ptr, userrec* user, char* text, ...);
62 int common_channels(userrec *u, userrec *u2);
63 void WriteCommon(userrec *u, char* text, ...);
64 void WriteCommonExcept(userrec *u, char* text, ...);
65 void WriteWallOps(userrec *source, char* text, ...);
66 int isnick(const char *n);
67 userrec* Find(string nick);
68 chanrec* FindChan(const char* chan);
69 char* cmode(userrec *user, chanrec *chan);
70 string getservername();
71 string getnetworkname();
72 string getadminname();
73 string getadminemail();
74 string getadminnick();
75 void readfile(file_cache &F, const char* fname);
76