diff options
author | Adam <Adam@anope.org> | 2013-07-08 20:35:04 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-07-08 20:35:04 -0400 |
commit | eabb9c0c11c3fdd51c57410f4b104bf08ca57d46 (patch) | |
tree | 0f9855c9ce3470c18b569efff2a5cf5ba02f4fa9 /modules/commands/bs_badwords.cpp | |
parent | b103d16eb1a9182715b808d913f964abd9f783be (diff) |
Fix deleting badwords/modes/logs etc
Diffstat (limited to 'modules/commands/bs_badwords.cpp')
-rw-r--r-- | modules/commands/bs_badwords.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index ff9707778..b64ed9b59 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -35,6 +35,8 @@ struct BadWordsImpl : BadWords BadWordsImpl(Extensible *obj) : ci(anope_dynamic_static_cast<ChannelInfo *>(obj)), badwords("BadWord") { } + ~BadWordsImpl(); + BadWord* AddBadWord(const Anope::string &word, BadWordType type) anope_override { BadWordImpl *bw = new BadWordImpl(); @@ -87,6 +89,16 @@ struct BadWordsImpl : BadWords } }; +BadWordsImpl::~BadWordsImpl() +{ + for (list::iterator it = badwords->begin(); it != badwords->end();) + { + BadWord *bw = *it; + ++it; + delete bw; + } +} + BadWordImpl::~BadWordImpl() { ChannelInfo *ci = ChannelInfo::Find(chan); |