]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/inspircd.h
...
[user/henk/code/inspircd.git] / include / inspircd.h
1 /*
2
3 $Log$
4 Revision 1.1  2003/01/23 19:45:58  brain
5 Initial revision
6
7 Revision 1.7  2003/01/22 20:49:16  brain
8 Added FileReader file-caching class
9 Changed m_randquote to use FileReader class
10
11 Revision 1.6  2003/01/19 20:12:24  brain
12 Fixed ident max length to 10
13
14 Revision 1.5  2003/01/15 22:47:44  brain
15 Changed user and channel structs to classes (finally)
16
17 Revision 1.4  2003/01/13 22:30:50  brain
18 Added Admin class (holds /admin info for modules)
19 Added methods to Server class
20
21
22 */
23
24
25 #include <string>
26 #include <stdio.h>
27 #include <syslog.h>
28 #include <stdlib.h>
29 #include <unistd.h>
30 #include <signal.h>
31 #include <time.h>
32 #include <netdb.h>
33 #include <string.h>
34 #include <ctype.h>
35 #include <errno.h>
36 #include <stdarg.h>
37 #include <assert.h>
38 #include <sys/param.h>
39 #include <sys/types.h>
40 #ifndef _LINUX_C_LIB_VERSION
41 #include <sys/socket.h>
42 #include <sys/stat.h>
43 #include <netinet/in.h>
44 #endif
45 #include <arpa/inet.h>
46 #include <string>
47 #include <deque>
48
49 #include "inspircd_config.h"
50 #include "inspircd_io.h"
51 #include "inspircd_util.h"
52 #include "users.h"
53 #include "channels.h"
54
55 #define ERROR -1
56 #define TRUE 1
57 #define FALSE 0
58 #define IDENTMAX 9
59 /* max sockets we can open */
60 #define MAXSOCKS 64
61
62 typedef deque<string> file_cache;
63
64 /* prototypes */
65 int InspIRCd(void);
66 int InitConfig(void);
67 void Error(int status);
68 void send_error(char *s);
69 void ReadConfig(void);
70 void strlower(char *n);
71
72 void WriteOpers(char* text, ...);
73 void debug(char *text, ...);
74 void Write(int sock,char *text, ...);
75 void WriteServ(int sock, char* text, ...);
76 void WriteFrom(int sock, userrec *user,char* text, ...);
77 void WriteTo(userrec *source, userrec *dest,char *data, ...);
78 void WriteChannel(chanrec* Ptr, userrec* user, char* text, ...);
79 void ChanExceptSender(chanrec* Ptr, userrec* user, char* text, ...);
80 int common_channels(userrec *u, userrec *u2);
81 void WriteCommon(userrec *u, char* text, ...);
82 void WriteCommonExcept(userrec *u, char* text, ...);
83 void WriteWallOps(userrec *source, char* text, ...);
84 int isnick(const char *n);
85 userrec* Find(string nick);
86 chanrec* FindChan(const char* chan);
87 char* cmode(userrec *user, chanrec *chan);
88 string getservername();
89 string getnetworkname();
90 string getadminname();
91 string getadminemail();
92 string getadminnick();
93 void readfile(file_cache &F, const char* fname);
94