diff options
author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-05-02 10:34:58 +0000 |
---|---|---|
committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-05-02 10:34:58 +0000 |
commit | c5cb6ef9fe5faffab9630a2d2684e7373f32403f (patch) | |
tree | df7bb62dbe48a8dd03ebbad5bb11aac257577937 /modules.c | |
parent | 7250a369ab2f5f1980050b0f4cee251ad64ad009 (diff) |
BUILD : 1.7.2 (80) BUGS : N/A NOTES : Added Memos/ChannelInfo to the moduleAddData() system
git-svn-id: svn://svn.anope.org/anope/trunk@80 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@56 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'modules.c')
-rw-r--r-- | modules.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1939,10 +1939,12 @@ void moduleDelAllData(ModuleData * md[]) void moduleDelAllDataMod(Module * m) { boolean freeme = false; - int i; + int i, j; User *user; NickAlias *na; NickCore *nc; + ChannelInfo *ci; + if (!mod_current_module_name) { mod_current_module_name = sstrdup(m->name); freeme = true; @@ -1956,12 +1958,28 @@ void moduleDelAllDataMod(Module * m) /* Remove the nick Cores */ for (nc = nclists[i]; nc; nc = nc->next) { moduleDelAllData(nc->moduleData); + /* Remove any memo data for this nick core */ + for (j = 0; j < nc->memos.memocount; j++) { + moduleCleanStruct(nc->memos.memos[j].moduleData); + } } /* Remove the nick Aliases */ for (na = nalists[i]; na; na = na->next) { moduleDelAllData(na->moduleData); } } + + for (i = 0; i < 256; i++) { + /* Remove any chan info data */ + for (ci = chanlists[i]; ci; ci = ci->next) { + moduleDelAllData(ci->moduleData); + /* Remove any memo data for this nick core */ + for (j = 0; j < ci->memos.memocount; j++) { + moduleCleanStruct(ci->memos.memos[j].moduleData); + } + } + } + if (freeme) { free(mod_current_module_name); mod_current_module_name = NULL; |