summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-05-22 14:30:18 +0100
committerSadie Powell <sadie@witchery.services>2024-05-22 14:30:18 +0100
commitbce0d629fd09e10a17bc2cdc2f3f7fb81cc9ee7b (patch)
tree79bf26871c4c43c02163077a617d9d45cae17995
parent7d0dacc86c9e75c9500b98f9895c3f9255923ddf (diff)
Fix another iterator invalidation issue.
-rw-r--r--modules/chanserv/cs_mode.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/chanserv/cs_mode.cpp b/modules/chanserv/cs_mode.cpp
index 8f462a3cb..1ea0e9716 100644
--- a/modules/chanserv/cs_mode.cpp
+++ b/modules/chanserv/cs_mode.cpp
@@ -658,7 +658,8 @@ class CommandCSMode final
}
else
{
- for (const auto &mode : ci->c->GetModeList(cm->name))
+ std::vector<Anope::string> v = ci->c->GetModeList(cm->name);
+ for (const auto &mode : v)
{
if (Anope::Match(mode, param))
ci->c->RemoveMode(NULL, cm, mode);