summaryrefslogtreecommitdiff
path: root/modules/commands/cs_mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_mode.cpp')
-rw-r--r--modules/commands/cs_mode.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index b11bc8862..86eaf1619 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -44,10 +44,11 @@ struct ModeLocksImpl : ModeLocks
~ModeLocksImpl()
{
- for (ModeList::iterator it = this->mlocks->begin(); it != this->mlocks->end();)
+ ModeList modelist;
+ mlocks->swap(modelist);
+ for (ModeList::iterator it = modelist.begin(); it != modelist.end(); ++it)
{
ModeLock *ml = *it;
- ++it;
delete ml;
}
}
@@ -921,7 +922,7 @@ class CSMode : public Module
}
else if (cm->type == MODE_PARAM)
{
- /* If the channel doesnt have the mode, or it does and it isn't set correctly */
+ /* If the channel doesn't have the mode, or it does and it isn't set correctly */
if (ml->set)
{
Anope::string param;