diff options
| author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-04-28 20:18:10 +0000 |
|---|---|---|
| committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-04-28 20:18:10 +0000 |
| commit | fba6022e42fc80bbbd4912e2a4591889844907e2 (patch) | |
| tree | a836b3964ffe7804333fd7898760c853347464b4 /users.c | |
| parent | 33b49b12cbefc51f2d9d09cdc3e96fa10b271be7 (diff) | |
BUILD : 1.7.2 (74) BUGS : N/A NOTES : Added moduleAddData() and moduleGetData() currently only added to the User struct as a test
git-svn-id: svn://svn.anope.org/anope/trunk@74 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@50 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'users.c')
| -rw-r--r-- | users.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -362,6 +362,9 @@ static void delete_user(User * user) { struct u_chanlist *c, *c2; struct u_chaninfolist *ci, *ci2; + int i; + ModuleData *md, *nextMd; + ModuleDataItem *item, *nextItem; if (LogUsers) { #ifdef HAS_VHOST @@ -412,6 +415,22 @@ static void delete_user(User * user) free(ci); ci = ci2; } + + for (i = 0; i < 1024; i++) { /* Clear up any module data used be the User struct */ + for (md = user->moduleData[i]; md; md = nextMd) { + nextMd = md->next; + for (item = md->di; item; item = nextItem) { + nextItem = item->next; + free(item->key); + free(item->value); + item->next = NULL; + free(item); + } + free(md->moduleName); + free(md); + } + } + if (debug >= 2) alog("debug: delete_user(): delete from list"); if (user->prev) |
