mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 10:13:13 +02:00
Added ZIP_LINKS: using flag FLAGS_ZIP (0x1000000, was FLAGS_UNOCCUP2),
instead of using a 2nd flag here for the special case of "the first zip msg" like in hybrid/etc I use cptr->zip->first to flag that. Except for the many #ifdef ZIP_LINKS blocks added I also had to do some stuff outside it, like crc32->our_crc32 because zlib defines it, made a READBUF define (8192), added a msg var to parsing/send functions.. blah.. etc ;P. I've also put the patch online at www.vulnscan.org/tmp/zip_links.diff so you can easily look what I've changed. TODO: ask in ./Config if ziplinks should be enabled and let ./configure check for zlib + add the library to IRCDLIBS in Makefile if enabled. TODO: some little code cleanups
This commit is contained in:
+16
-1
@@ -127,6 +127,10 @@ typedef struct SMember Member;
|
||||
typedef struct SMembership Membership;
|
||||
typedef struct SMembershipL MembershipL;
|
||||
|
||||
#ifdef ZIP_LINKS
|
||||
typedef struct Zdata aZdata;
|
||||
#endif
|
||||
|
||||
#ifdef NEED_U_INT32_T
|
||||
typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#endif
|
||||
@@ -279,7 +283,9 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define FLAGS_NETINFO 0x200000
|
||||
#define FLAGS_HYBNOTICE 0x400000
|
||||
#define FLAGS_QUARANTINE 0x800000
|
||||
#define FLAGS_UNOCCUP2 0x1000000
|
||||
#ifdef ZIP_LINKS
|
||||
#define FLAGS_ZIP 0x1000000
|
||||
#endif
|
||||
#define FLAGS_UNOCCUP3 0x2000000
|
||||
#define FLAGS_SHUNNED 0x4000000
|
||||
#ifdef USE_SSL
|
||||
@@ -383,6 +389,11 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define IsSecure(x) (0)
|
||||
#endif
|
||||
|
||||
#ifdef ZIP_LINKS
|
||||
#define IsZipped(x) ((x)->flags & FLAGS_ZIP)
|
||||
#define IsZipStart(x) (((x)->flags & FLAGS_ZIP) && ((x)->zip->first == 1))
|
||||
#endif
|
||||
|
||||
#define IsHybNotice(x) ((x)->flags & FLAGS_HYBNOTICE)
|
||||
#define SetHybNotice(x) ((x)->flags |= FLAGS_HYBNOTICE)
|
||||
#define ClearHybNotice(x) ((x)->flags &= ~FLAGS_HYBNOTICE)
|
||||
@@ -441,6 +452,10 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define ClearHidden(x) ((x)->umodes &= ~UMODE_HIDE)
|
||||
#define ClearHideOper(x) ((x)->umodes &= ~UMODE_HIDEOPER)
|
||||
|
||||
#ifdef ZIP_LINKS
|
||||
#define SetZipped(x) ((x)->flags |= FLAGS_ZIP)
|
||||
#define ClearZipped(x) ((x)->flags &= ~FLAGS_ZIP)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ProtoCtl options
|
||||
|
||||
Reference in New Issue
Block a user