aboutsummaryrefslogtreecommitdiff
path: root/src/listmode.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-08-12 08:41:24 +0100
committerGravatar Sadie Powell2023-08-12 08:41:24 +0100
commit2953c643e7e57899cc4336177b8fca790211f363 (patch)
tree0ddc6ecca449df3b13a64831fee3a85c380c8ab2 /src/listmode.cpp
parentRename the error log level to critical. (diff)
Fix list modes unintentionally being case sensitive.
Closes #907.
Diffstat (limited to 'src/listmode.cpp')
-rw-r--r--src/listmode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listmode.cpp b/src/listmode.cpp
index f70409a5e..7707e269e 100644
--- a/src/listmode.cpp
+++ b/src/listmode.cpp
@@ -171,7 +171,7 @@ bool ListModeBase::OnModeChange(User* source, User*, Channel* channel, Modes::Ch
// Check if the item already exists in the list
for (const auto& entry : cd->list)
{
- if (change.param != entry.mask)
+ if (!CompareEntry(entry.mask, change.param))
continue; // Doesn't match the proposed addition.
if (lsource)
@@ -206,7 +206,7 @@ bool ListModeBase::OnModeChange(User* source, User*, Channel* channel, Modes::Ch
// We have a list and we're removing; is the entry in it?
for (ModeList::iterator it = cd->list.begin(); it != cd->list.end(); ++it)
{
- if (change.param != it->mask)
+ if (!CompareEntry(it->mask, change.param))
continue; // Doesn't match the proposed removal.
stdalgo::vector::swaperase(cd->list, it);