unsigned long bants;
time_t channelts;
char *chname;
+
+ struct Client *last_checked_client;
+ time_t last_checked_ts;
+ unsigned int last_checked_type;
+ int last_checked_result;
};
struct membership
struct Channel *chptr;
struct Client *client_p;
unsigned int flags;
- unsigned int roles;
unsigned long bants;
};
char *banstr;
char *who;
time_t when;
+ char *forward;
rb_dlink_node node;
};
const char *arg;
const char *id;
int dir;
- int caps;
- int nocaps;
int mems;
- struct Client *client;
-};
-
-struct ChCapCombo
-{
- int count;
- int cap_yes;
- int cap_no;
};
typedef void (*ChannelModeFunc)(struct Client *source_p, struct Channel *chptr,
#define MODE_INVITEONLY 0x0010
#define MODE_NOPRIVMSGS 0x0020
#define MODE_REGONLY 0x0040
-#define MODE_NOCOLOR 0x0080
#define MODE_EXLIMIT 0x0100 /* exempt from list limits, +b/+e/+I/+q */
#define MODE_PERMANENT 0x0200 /* permanant channel, +P */
#define MODE_OPMODERATE 0x0400 /* send rejected messages to ops */
#define MODE_FREEINVITE 0x0800 /* allow free use of /invite */
#define MODE_FREETARGET 0x1000 /* can be forwarded to without authorization */
#define MODE_DISFORWARD 0x2000 /* disable channel forwarding */
-#define MODE_NOCTCP 0x8000 /* Block CTCPs directed to this channel */
#define CHFL_BAN 0x10000000 /* ban channel flag */
#define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */
#define MODE_ADD 1
#define MODE_DEL -1
-/* Channel roles */
-#define CHANROLE_NONE 0x000
-#define CHANROLE_UNSET 0x001 /* Special value */
-#define CHANROLE_KICK 0x002 /* Can kick */
-#define CHANROLE_STATUS 0x004 /* Can change status modes */
-#define CHANROLE_GRANT 0x008 /* Can grant (unused atm) */
-#define CHANROLE_MODE 0x010 /* Can change modes */
-#define CHANROLE_TOPIC 0x020 /* Can change topic */
-
#define SecretChannel(x) ((x) && ((x)->mode.mode & MODE_SECRET))
#define HiddenChannel(x) ((x) && ((x)->mode.mode & MODE_PRIVATE))
#define PubChannel(x) ((!x) || ((x)->mode.mode &\
(MODE_PRIVATE | MODE_SECRET)) == 0)
-#define HasChanRole(m, r) (((m)->roles & r) != 0)
-#define SetChanRole(m, r) ((m)->roles |= r)
-#define RemoveChanRole(m, r) ((m)->roles &= ~r)
-
-#define IsChanRoleSet(m, r)
-
/* channel visible */
#define ShowChannel(v,c) (PubChannel(c) || IsMember((v),(c)))
struct Channel *allocate_channel(const char *chname);
void free_channel(struct Channel *chptr);
-struct Ban *allocate_ban(const char *, const char *);
+struct Ban *allocate_ban(const char *, const char *, const char *);
void free_ban(struct Ban *bptr);
extern void destroy_channel(struct Channel *);
-extern int can_send(struct Channel *chptr, struct Client *who,
+extern int can_send(struct Channel *chptr, struct Client *who,
struct membership *);
extern int flood_attack_channel(int p_or_n, struct Client *source_p,
struct Channel *chptr, char *chname);
extern int is_banned(struct Channel *chptr, struct Client *who,
- struct membership *msptr, const char *, const char *);
+ struct membership *msptr, const char *, const char *, const char **);
extern int is_quieted(struct Channel *chptr, struct Client *who,
struct membership *msptr, const char *, const char *);
-extern int can_join(struct Client *source_p, struct Channel *chptr, char *key);
+extern int can_join(struct Client *source_p, struct Channel *chptr,
+ const char *key, const char **forward);
extern struct membership *find_channel_membership(struct Channel *, struct Client *);
extern const char *find_channel_status(struct membership *msptr, int combine);
extern struct ChannelMode chmode_table[256];
extern int add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
- rb_dlink_list * list, long mode_type);
+ const char *forward, rb_dlink_list * list, long mode_type);
-extern int del_id(struct Channel *chptr, const char *banid, rb_dlink_list * list, long mode_type);
+extern struct Ban * del_id(struct Channel *chptr, const char *banid, rb_dlink_list * list,
+ long mode_type);
extern ExtbanFunc extban_table[256];
extern int valid_extban(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type);
const char * get_extban_string(void);
-extern int get_channel_access(struct Client *source_p, struct membership *msptr, int role);
+extern int get_channel_access(struct Client *source_p, struct membership *msptr, int dir);
extern void send_channel_join(struct Channel *chptr, struct Client *client_p);