summaryrefslogtreecommitdiff
path: root/modules/commands/ns_ajoin.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-03-21 23:39:39 -0500
committerAdam <Adam@anope.org>2013-03-21 23:39:39 -0500
commitdcffa5da6fe7aad26860973af5651f7c59902343 (patch)
tree97634bfb9f950750613a0539f5ea5f3b7ee247ad /modules/commands/ns_ajoin.cpp
parent221e79f50d59eff98a2c671332bf9d92dbe35dd5 (diff)
Properly cleanup after entrymsglists and ajoinlists when destructed
Diffstat (limited to 'modules/commands/ns_ajoin.cpp')
-rw-r--r--modules/commands/ns_ajoin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp
index 605fd12c1..3f4d9d3ec 100644
--- a/modules/commands/ns_ajoin.cpp
+++ b/modules/commands/ns_ajoin.cpp
@@ -18,6 +18,7 @@ struct AJoinEntry;
struct AJoinList : Serialize::Checker<std::vector<AJoinEntry *> >, ExtensibleItem
{
AJoinList() : Serialize::Checker<std::vector<AJoinEntry *> >("AJoinEntry") { }
+ ~AJoinList();
};
struct AJoinEntry : Serializable
@@ -75,6 +76,12 @@ struct AJoinEntry : Serializable
}
};
+AJoinList::~AJoinList()
+{
+ for (unsigned i = 0; i < (*this)->size(); ++i)
+ delete (*this)->at(i);
+}
+
class CommandNSAJoin : public Command
{
void DoList(CommandSource &source, NickCore *nc)