X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fchannel.h;h=dcd93ea394973394aeca24d1a99aac9a4c4c9aaf;hb=2428eebc52e3df5fc012320ef83754234d0ff568;hp=af416d922ae3aa0f9a1b4eb9079fcd168d298289;hpb=9e57a276dcedfbeabc8e1e9ca5a2b9b14095aeba;p=ircu2.10.12-pk.git diff --git a/include/channel.h b/include/channel.h index af416d9..dcd93ea 100644 --- a/include/channel.h +++ b/include/channel.h @@ -128,15 +128,17 @@ typedef signed long long long64; #define MODE_ALTCHAN 0x8000000 /**< Alternative channel */ #define MODE_DEL 0x20000000 #define MODE_ADD 0x40000000 -#define MODE_ACCESS 0x100000000LLU /**< ChanServ access */ +#define MODE_ACCESS 0x100000000LLU /**< ChanServ access */ +#define MODE_AUDITORIUM 0x200000000LLU /**< +u Auditorium */ +#define MODE_NOFLOOD 0x400000000LLU /**< +f NoFlood */ /** mode flags which take another parameter (With PARAmeterS) */ -#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS|MODE_EXCEPTION|MODE_ALTCHAN|MODE_ACCESS) +#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS|MODE_EXCEPTION|MODE_ALTCHAN|MODE_ACCESS|MODE_NOFLOOD) /** Available Channel modes */ -#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AcCbiklmMnNopstUvrDRzQ" : "cCbiklmMnNopstvrDRzQ" +#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AcCbiklmMnNopstuUvrDRzQu" : "cCbiklmMnNopstuvrDRzQu" /** Available Channel modes that take parameters */ -#define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "AbkloUvFa" : "bklovFa" +#define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "AbfkloUvFa" : "bfklovFa" #define HoldChannel(x) (!(x)) /** name invisible */ @@ -204,10 +206,20 @@ struct Membership { struct Membership* prev_member; /**< The previous user on this channel*/ struct Membership* next_channel; /**< Next channel this user is on */ struct Membership* prev_channel; /**< Previous channel this user is on*/ + struct MemberFlood* flood; /**< count's how many times a user sent something (+f floodcontrol) */ unsigned int status; /**< Flags for op'd, voice'd, etc */ unsigned short oplevel; /**< Op level */ }; +#define FLFL_CHANOP 0x01 +#define FLFL_VOICE 0x02 +#define FLFL_NOFLOOD 0x04 + +struct MemberFlood { + struct MemberFlood* next_memberflood; + time_t time; +}; + #define MAXOPLEVELDIGITS 3 #define MAXOPLEVEL 999 @@ -250,6 +262,8 @@ struct Mode { ulong64 mode; unsigned int limit; unsigned int access; + char noflood[11]; //max [@+]999:9999 + unsigned int noflood_value; //3bit for @+, 10bit first field, 14bit second field = 27bit of 32bit char key[KEYLEN + 1]; char upass[KEYLEN + 1]; char apass[KEYLEN + 1]; @@ -424,6 +438,7 @@ extern void list_set_default(void); /* this belongs elsewhere! */ extern void RevealDelayedJoinIfNeeded(struct Client *sptr, struct Channel *chptr); extern void RevealDelayedJoin(struct Membership *member); extern void CheckDelayedJoins(struct Channel *chan); +extern void CheckEnableDelayedJoins(struct Channel *chan); extern void modebuf_init(struct ModeBuf *mbuf, struct Client *source, struct Client *connect, struct Channel *chan, @@ -467,5 +482,6 @@ extern int apply_ban(struct Ban **banlist, struct Ban *newban, int free); extern void free_ban(struct Ban *ban); extern signed int destruct_nonpers_channel(struct Channel *chptr); extern int ext_amsg_block(struct Client *cptr, struct Channel *chptr, const char *msg); +extern int ext_noflood_block(struct Client *cptr, struct Channel *chptr); #endif /* INCLUDED_channel_h */