1 |
/* Main header for Services. |
2 |
* |
3 |
* IRC Services is copyright (c) 1996-2009 Andrew Church. |
4 |
* E-mail: <achurch@achurch.org> |
5 |
* Parts written by Andrew Kempe and others. |
6 |
* This program is free but copyrighted software; see the file GPL.txt for |
7 |
* details. |
8 |
*/ |
9 |
|
10 |
#ifndef SERVICES_H |
11 |
#define SERVICES_H |
12 |
|
13 |
/*************************************************************************/ |
14 |
|
15 |
/* System configuration information (from "configure"): */ |
16 |
#include "config.h" |
17 |
|
18 |
/* User configuration and basic constants, macros, and includes: */ |
19 |
#include "defs.h" |
20 |
|
21 |
/*************************************************************************/ |
22 |
/*************************************************************************/ |
23 |
|
24 |
/* Types corresponding to various structures. These have to come first |
25 |
* because some structures reference each other circularly. */ |
26 |
|
27 |
typedef struct user_ User; |
28 |
typedef struct channel_ Channel; |
29 |
typedef struct server_ Server; |
30 |
typedef struct serverstats_ ServerStats; |
31 |
|
32 |
typedef struct nickinfo_ NickInfo; |
33 |
typedef struct nickgroupinfo_ NickGroupInfo; |
34 |
typedef struct channelinfo_ ChannelInfo; |
35 |
typedef struct memoinfo_ MemoInfo; |
36 |
|
37 |
|
38 |
/* Types for various name buffers, so we can make arrays of them. */ |
39 |
|
40 |
typedef char nickname_t[NICKMAX]; |
41 |
typedef char channame_t[CHANMAX]; |
42 |
|
43 |
/*************************************************************************/ |
44 |
|
45 |
/* Suspension info structure. */ |
46 |
|
47 |
typedef struct suspendinfo_ SuspendInfo; |
48 |
struct suspendinfo_ { |
49 |
char who[NICKMAX]; /* who added this suspension */ |
50 |
char *reason; |
51 |
time_t suspended; |
52 |
time_t expires; /* 0 for no expiry */ |
53 |
}; |
54 |
|
55 |
/*************************************************************************/ |
56 |
|
57 |
/* Constants for "what" parameter to clear_channel(). */ |
58 |
|
59 |
#define CLEAR_MODES 0x0001 /* Binary modes */ |
60 |
#define CLEAR_BANS 0x0002 /* Bans */ |
61 |
#define CLEAR_EXCEPTS 0x0004 /* Ban exceptions (no-op if not supported) */ |
62 |
#define CLEAR_INVITES 0x0008 /* Invite masks (no-op if not supported) */ |
63 |
#define CLEAR_UMODES 0x0010 /* User modes (+v, +o) */ |
64 |
|
65 |
#define CLEAR_USERS 0x8000 /* Kick all users and empty the channel */ |
66 |
|
67 |
/* All channel modes: */ |
68 |
#define CLEAR_CMODES (CLEAR_MODES|CLEAR_BANS|CLEAR_EXCEPTS|CLEAR_INVITES) |
69 |
|
70 |
/*************************************************************************/ |
71 |
/*************************************************************************/ |
72 |
|
73 |
/* All other "main" include files. */ |
74 |
|
75 |
#include "memory.h" |
76 |
#include "list-array.h" |
77 |
#include "log.h" |
78 |
#include "sockets.h" |
79 |
#include "send.h" |
80 |
#include "modes.h" |
81 |
#include "users.h" |
82 |
#include "channels.h" |
83 |
#include "servers.h" |
84 |
|
85 |
#include "extern.h" |
86 |
|
87 |
/*************************************************************************/ |
88 |
|
89 |
#endif /* SERVICES_H */ |
90 |
|
91 |
/* |
92 |
* Local variables: |
93 |
* c-file-style: "stroustrup" |
94 |
* c-file-offsets: ((case-label . *) (statement-case-intro . *)) |
95 |
* indent-tabs-mode: nil |
96 |
* End: |
97 |
* |
98 |
* vim: expandtab shiftwidth=4: |
99 |
*/ |