#include "nickserv.h"
enum UL_ALIASES {
- UL_PEON = 100,
+ UL_PEON = 1,
UL_HALFOP = 150,
UL_OP = 200,
UL_MANAGER = 300,
- UL_PRESENT = UL_MANAGER,
+ UL_PRESENT = UL_MANAGER, /* Level needed to keep the channel active */
UL_COOWNER = 400,
UL_OWNER = 500,
UL_HELPER = 600,
#define USER_SUSPENDED 0x00000002
#define USER_AUTO_INVITE 0x00000004
#define USER_AUTO_OP 0x00000008
-#define USER_FLAGS_SIZE 15
+#define USER_AUTO_JOIN 0x00000010
+#define USER_FLAGS_SIZE 25
#define USER_FLAGS_DEFAULT USER_AUTO_OP
#define IsUserAutoOp(USER) ((USER)->flags & USER_AUTO_OP)
#define IsUserSuspended(USER) ((USER)->flags & USER_SUSPENDED)
#define IsUserAutoInvite(USER) ((USER)->flags & USER_AUTO_INVITE)
+#define IsUserAutoJoin(USER) ((USER)->flags & USER_AUTO_JOIN)
struct userData
{
char reason[1];
};
+#define GetChannelUser(channel, handle) _GetChannelUser(channel, handle, 1, 0)
+struct userData *_GetChannelUser(struct chanData *channel, struct handle_info *handle, int override, int allow_suspended);
+struct banData *add_channel_ban(struct chanData *channel, const char *mask, char *owner, time_t set, time_t triggered, time_t expires, char *reason);
+
void init_chanserv(const char *nick);
void del_channel_user(struct userData *user, int do_gc);
struct channelList *chanserv_support_channels(void);
void process_adduser_pending(struct userNode *user);
void wipe_adduser_pending(struct chanNode *channel, struct userNode *user);
+int check_bans(struct userNode *user, const char *channel);
+
#endif