summaryrefslogtreecommitdiff
path: root/include/services.h
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-09-19 10:28:02 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-09-19 10:28:02 +0000
commitfe0992a6aba0a7a95b666ecb52df8ce1a6d5a723 (patch)
tree5d45b54d05662b624b86a12bf94bd586bf77e68a /include/services.h
parentaa896a87ac4705a5a8a26cbf5ddae2db3fc54c62 (diff)
BUILD : 1.7.5 (351) BUGS : N/A NOTES : Rewrote the internals of moduleData, this will save _lots_ of memory especially on larger networks. The downside is modules using it need to make a tiny, tiny change... :/
git-svn-id: svn://svn.anope.org/anope/trunk@351 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@227 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/services.h')
-rw-r--r--include/services.h26
1 files changed, 10 insertions, 16 deletions
diff --git a/include/services.h b/include/services.h
index c63fd8d81..726bc2a7c 100644
--- a/include/services.h
+++ b/include/services.h
@@ -129,7 +129,6 @@ typedef struct server_ Server;
typedef struct user_ User;
typedef struct channel_ Channel;
typedef struct ModuleData_ ModuleData; /* ModuleData struct */
-typedef struct ModuleDataItem_ ModuleDataItem; /* A Module Data Item struct */
typedef struct memo_ Memo;
typedef struct nickrequest_ NickRequest;
typedef struct nickalias_ NickAlias;
@@ -301,19 +300,14 @@ struct ircdcapab_ {
* ModuleData strucs used to allow modules to add / delete module Data from existing structs
*/
-struct ModuleDataItem_ {
- char *key; /* The key */
- char *value; /* The Value */
- ModuleDataItem *next; /* The next ModuleDataItem in this list */
-};
-
-struct ModuleData_ {
+struct ModuleData_ {
char *moduleName; /* Which module we belong to */
- ModuleDataItem *di; /* The first Item they own */
+ char *key; /* The key */
+ char *value; /* The Value */
ModuleData *next; /* The next ModuleData record */
};
-
-/*************************************************************************/
+
+ /*************************************************************************/
/* Memo info structures. Since both nicknames and channels can have memos,
* we encapsulate memo data in a MemoList to make it easier to handle. */
@@ -324,7 +318,7 @@ struct memo_ {
time_t time; /* When it was sent */
char sender[NICKMAX];
char *text;
- ModuleData *moduleData[1024]; /* Module saved data attached to the Memo */
+ ModuleData *moduleData; /* Module saved data attached to the Memo */
};
typedef struct {
@@ -358,7 +352,7 @@ struct nickalias_ {
int16 status; /* See NS_* below */
NickCore *nc; /* I'm an alias of this */
/* Not saved */
- ModuleData *moduleData[1024]; /* Module saved data attached to the nick alias */
+ ModuleData *moduleData; /* Module saved data attached to the nick alias */
User *u; /* Current online user that has me */
};
@@ -380,7 +374,7 @@ struct nickcore_ {
uint16 channelmax; /* Maximum number of channels allowed */
/* Unsaved data */
- ModuleData *moduleData[1024]; /* Module saved data attached to the NickCore */
+ ModuleData *moduleData; /* Module saved data attached to the NickCore */
time_t lastmail; /* Last time this nick record got a mail */
SList aliases; /* List of aliases */
};
@@ -514,7 +508,7 @@ struct chaninfo_ {
struct channel_ *c; /* Pointer to channel record (if *
* channel is currently in use) */
- ModuleData *moduleData[1024]; /* Module saved data attached to the ChannelInfo */
+ ModuleData *moduleData; /* Module saved data attached to the ChannelInfo */
/* For BotServ */
@@ -695,7 +689,7 @@ struct user_ {
NickAlias *na;
- ModuleData *moduleData[1024]; /* defined for it, it should allow the module Add/Get */
+ ModuleData *moduleData; /* defined for it, it should allow the module Add/Get */
int isSuperAdmin; /* is SuperAdmin on or off? */