From a21222a672787ebe8ee161b778ce6ca9734949a7 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 6 Sep 2017 16:29:48 +0200 Subject: [PATCH] Bump MODDATA_MAX_CLIENT from 8 to 12 and move MODDATA_MAX_* to include/config.h --- doc/RELEASE-NOTES | 2 ++ include/config.h | 9 +++++++++ include/struct.h | 6 ------ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/RELEASE-NOTES b/doc/RELEASE-NOTES index 346ecca98..241cfa117 100644 --- a/doc/RELEASE-NOTES +++ b/doc/RELEASE-NOTES @@ -56,6 +56,8 @@ Other changes: Now you can no longer, since there is no legitimate reason to do so. * Update cipher suite to work with TLS 1.3. This ensures you can use TLS 1.3 in UnrealIRCd 4.0.14+ when OpenSSL supports it (in the future). +* Bump MODDATA_MAX_CLIENT from 8 to 12: needed if you have a lot of + 3rd party modules loaded. Also moved MODDATA_MAX_* to include/config.h Module coders: * You can now attach ModData to server objects as well (including &me). diff --git a/include/config.h b/include/config.h index 743dff156..2b854ac0f 100644 --- a/include/config.h +++ b/include/config.h @@ -428,6 +428,15 @@ /* Use TRE Regex Library (as well) ? */ #define USE_TRE +/* Maximum number of ModData objects that may be attached to an object */ +/* UnrealIRCd 4.0.0 - 4.0.13: 8, 8, 4, 4 + * UnrealIRCd 4.0.14+ : 12, 8, 4, 4 + */ +#define MODDATA_MAX_CLIENT 12 +#define MODDATA_MAX_CHANNEL 8 +#define MODDATA_MAX_MEMBER 4 +#define MODDATA_MAX_MEMBERSHIP 4 + /* If EXPERIMENTAL is #define'd then all users will receive a notice about * this when they connect, along with a pointer to bugs.unrealircd.org where * they can report any problems. This is mainly to help UnrealIRCd development. diff --git a/include/struct.h b/include/struct.h index f94f6d6f7..88fee8a7c 100644 --- a/include/struct.h +++ b/include/struct.h @@ -520,12 +520,6 @@ typedef OperPermission (*OperClassEntryEvalCallback)(OperClassACLEntryVar* varia #define ID(sptr) (*sptr->id ? sptr->id : sptr->name) -/* Maximum number of moddata objects that may be attached to an object -- maybe move to config.h? */ -#define MODDATA_MAX_CLIENT 8 -#define MODDATA_MAX_CHANNEL 8 -#define MODDATA_MAX_MEMBER 4 -#define MODDATA_MAX_MEMBERSHIP 4 - /** Union for moddata objects */ typedef union _moddata ModData; union _moddata