diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 17:55:55 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 17:55:55 +0000 |
| commit | b2b0e1d235686ff8389d2930a53366abefd1bb9d (patch) | |
| tree | 262a47642e64f91d8a240dad7d281cd205e13b50 /src/chanserv.c | |
| parent | 5384c97c141c9b3acfecb154b8bd41e57f706e00 (diff) | |
Create and use constructors for NickInfo, NickAlias, ChannelInfo. Inherit all three from Extensible. Convert to use that instead of moduleData stuff.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1705 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/chanserv.c')
| -rw-r--r-- | src/chanserv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/chanserv.c b/src/chanserv.c index e95a2a238..44b2a690a 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -324,7 +324,7 @@ void load_cs_dbase(void) while ((c = getc_db(f)) != 0) { if (c != 1) fatal("Invalid format in %s", ChanDBName); - ci = (ChannelInfo *)scalloc(sizeof(ChannelInfo), 1); + ci = new ChannelInfo(); *last = ci; last = &ci->next; ci->prev = prev; @@ -1640,7 +1640,7 @@ ChannelInfo *makechan(const char *chan) int i; ChannelInfo *ci; - ci = (ChannelInfo *)scalloc(sizeof(ChannelInfo), 1); + ci = new ChannelInfo(); strscpy(ci->name, chan, CHANMAX); ci->time_registered = time(NULL); reset_levels(ci); @@ -1806,9 +1806,8 @@ int delchan(ChannelInfo * ci) if (debug >= 2) { alog("debug: delchan() calling on moduleCleanStruct()"); } - moduleCleanStruct(&ci->moduleData); - free(ci); + delete ci; if (nc) nc->channelcount--; |
