1 |
/* Online channel data structure. |
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 CHANNELS_H |
11 |
#define CHANNELS_H |
12 |
|
13 |
/*************************************************************************/ |
14 |
|
15 |
struct channel_ { |
16 |
Channel *next, *prev; |
17 |
|
18 |
char name[CHANMAX]; |
19 |
ChannelInfo *ci; /* Corresponding ChannelInfo */ |
20 |
time_t creation_time; /* When channel was created */ |
21 |
|
22 |
char *topic; |
23 |
char topic_setter[NICKMAX]; /* Who set the topic */ |
24 |
time_t topic_time; /* When topic was set */ |
25 |
|
26 |
int32 mode; /* CMODE_* (binary) channel modes */ |
27 |
int32 limit; /* 0 if none */ |
28 |
char *key; /* NULL if none */ |
29 |
char *link; /* +L (Unreal, trircd) */ |
30 |
char *flood; /* +f (Unreal, etc.) */ |
31 |
int32 joindelay; /* +J (trircd) */ |
32 |
int32 joinrate1, joinrate2; /* +j (Bahamut) */ |
33 |
|
34 |
char **bans; |
35 |
int32 bans_count; |
36 |
char **excepts; |
37 |
int32 excepts_count; |
38 |
char **invites; |
39 |
int32 invites_count; |
40 |
|
41 |
struct c_userlist { |
42 |
struct c_userlist *next, *prev; |
43 |
User *user; |
44 |
int32 mode; /* CUMODE_* modes (chanop, voice) */ |
45 |
int16 flags; /* CUFLAG_* flags (below) */ |
46 |
} *users; |
47 |
|
48 |
time_t server_modetime; /* Time of last server MODE */ |
49 |
time_t chanserv_modetime; /* Time of last check_modes() */ |
50 |
int16 server_modecount; /* Number of server MODEs this second*/ |
51 |
int16 chanserv_modecount; /* Number of check_mode()'s this sec */ |
52 |
int16 bouncy_modes; /* Did we fail to set modes here? */ |
53 |
}; |
54 |
|
55 |
/* Set by ChanServ if it deops a user on joining a channel */ |
56 |
#define CUFLAG_DEOPPED 0x0001 |
57 |
|
58 |
/*************************************************************************/ |
59 |
|
60 |
#endif |
61 |
|
62 |
/* |
63 |
* Local variables: |
64 |
* c-file-style: "stroustrup" |
65 |
* c-file-offsets: ((case-label . *) (statement-case-intro . *)) |
66 |
* indent-tabs-mode: nil |
67 |
* End: |
68 |
* |
69 |
* vim: expandtab shiftwidth=4: |
70 |
*/ |