]>
Commit | Line | Data |
---|---|---|
1 | /* server.h */ | |
2 | ||
3 | #ifndef __SERVER_H | |
4 | #define __SERVER_H | |
5 | ||
6 | #include "../lib/sstring.h" | |
7 | #include "../irc/irc_config.h" | |
8 | #include "../lib/flags.h" | |
9 | ||
10 | #define LS_INVALID 0 /* No server here */ | |
11 | #define LS_LINKED 1 /* Server fully linked */ | |
12 | #define LS_LINKING 2 /* This actual server is bursting */ | |
13 | #define LS_PLINKING 3 /* Some other server between here and there is bursting */ | |
14 | #define LS_SQUIT 4 /* This server is being deleted due to a SQUIT */ | |
15 | ||
16 | #define SMODE_HUB 0x0001 | |
17 | #define SMODE_IPV6 0x0002 | |
18 | #define SMODE_SERVICE 0x0004 | |
19 | #define SMODE_OPERNAME 0x0008 | |
20 | ||
21 | #define SMODE_ALL 0x000F | |
22 | ||
23 | extern const flag smodeflags[]; | |
24 | ||
25 | typedef struct { | |
26 | sstring *name; | |
27 | sstring *description; | |
28 | short parent; | |
29 | short linkstate; | |
30 | int maxusernum; | |
31 | flag_t flags; | |
32 | } server; | |
33 | ||
34 | extern server serverlist[MAXSERVERS]; | |
35 | ||
36 | int handleservermsg(void *source, int cargc, char **cargv); | |
37 | int handleeobmsg(void *source, int cargc, char **argv); | |
38 | int handlesquitmsg(void *source, int cargc, char **cargv); | |
39 | void handledisconnect(int hooknum, void *arg); | |
40 | void deleteserver(long servernum); | |
41 | int findserver(const char *name); | |
42 | ||
43 | #endif |