29 |
|
|
30 |
|
#include "ircd_defs.h" /* KEYLEN, CHANNELLEN */ |
31 |
|
|
32 |
+ |
/* channel visible */ |
33 |
+ |
#define ShowChannel(v,c) (PubChannel(c) || IsMember((v),(c))) |
34 |
+ |
|
35 |
+ |
#define IsMember(who, chan) ((find_channel_link(who, chan)) ? 1 : 0) |
36 |
+ |
#define AddMemberFlag(x, y) ((x)->flags |= (y)) |
37 |
+ |
#define DelMemberFlag(x, y) ((x)->flags &= ~(y)) |
38 |
+ |
|
39 |
+ |
#define FLOOD_NOTICED 1 |
40 |
+ |
#define JOIN_FLOOD_NOTICED 2 |
41 |
+ |
|
42 |
+ |
#define SetFloodNoticed(x) ((x)->flags |= FLOOD_NOTICED) |
43 |
+ |
#define IsSetFloodNoticed(x) ((x)->flags & FLOOD_NOTICED) |
44 |
+ |
#define ClearFloodNoticed(x) ((x)->flags &= ~FLOOD_NOTICED) |
45 |
+ |
|
46 |
+ |
#define SetJoinFloodNoticed(x) ((x)->flags |= JOIN_FLOOD_NOTICED) |
47 |
+ |
#define IsSetJoinFloodNoticed(x) ((x)->flags & JOIN_FLOOD_NOTICED) |
48 |
+ |
#define ClearJoinFloodNoticed(x) ((x)->flags &= ~JOIN_FLOOD_NOTICED) |
49 |
+ |
|
50 |
|
struct Client; |
51 |
|
|
52 |
|
/*! \brief Mode structure for channels */ |
114 |
|
|
115 |
|
extern dlink_list global_channel_list; |
116 |
|
|
117 |
< |
extern int check_channel_name(const char *, int); |
118 |
< |
extern int can_send(struct Channel *, struct Client *, struct Membership *); |
117 |
> |
extern int check_channel_name(const char *, const int); |
118 |
> |
extern int can_send(struct Channel *, struct Client *, struct Membership *, const char *); |
119 |
|
extern int is_banned(const struct Channel *, const struct Client *); |
120 |
|
extern int can_join(struct Client *, struct Channel *, const char *); |
121 |
< |
extern int has_member_flags(struct Membership *, unsigned int); |
121 |
> |
extern int has_member_flags(const struct Membership *, const unsigned int); |
122 |
|
|
123 |
|
extern void remove_ban(struct Ban *, dlink_list *); |
124 |
< |
extern void init_channels(void); |
124 |
> |
extern void channel_init(void); |
125 |
|
extern void add_user_to_channel(struct Channel *, struct Client *, |
126 |
|
unsigned int, int); |
127 |
|
extern void remove_user_from_channel(struct Membership *); |
140 |
|
|
141 |
|
extern struct Channel *make_channel(const char *); |
142 |
|
extern struct Membership *find_channel_link(struct Client *, struct Channel *); |
125 |
– |
|
126 |
– |
/* channel visible */ |
127 |
– |
#define ShowChannel(v,c) (PubChannel(c) || IsMember((v),(c))) |
128 |
– |
|
129 |
– |
#define IsMember(who, chan) ((find_channel_link(who, chan)) ? 1 : 0) |
130 |
– |
#define AddMemberFlag(x, y) ((x)->flags |= (y)) |
131 |
– |
#define DelMemberFlag(x, y) ((x)->flags &= ~(y)) |
132 |
– |
|
133 |
– |
#define FLOOD_NOTICED 1 |
134 |
– |
#define JOIN_FLOOD_NOTICED 2 |
135 |
– |
|
136 |
– |
#define SetFloodNoticed(x) ((x)->flags |= FLOOD_NOTICED) |
137 |
– |
#define IsSetFloodNoticed(x) ((x)->flags & FLOOD_NOTICED) |
138 |
– |
#define ClearFloodNoticed(x) ((x)->flags &= ~FLOOD_NOTICED) |
139 |
– |
|
140 |
– |
#define SetJoinFloodNoticed(x) ((x)->flags |= JOIN_FLOOD_NOTICED) |
141 |
– |
#define IsSetJoinFloodNoticed(x) ((x)->flags & JOIN_FLOOD_NOTICED) |
142 |
– |
#define ClearJoinFloodNoticed(x) ((x)->flags &= ~JOIN_FLOOD_NOTICED) |
143 |
– |
|
143 |
|
#endif /* INCLUDED_channel_h */ |