summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-10-04 19:04:31 +0100
committerSadie Powell <sadie@witchery.services>2024-10-04 19:04:31 +0100
commit3da9b6df0d4a02225f82f809d76fb8f5a27cb6a4 (patch)
treef4e98c9349d31aac2effa81eb93f28c7fc918976
parent0ab0e4737c823cf0b3f26db550579c2f550e06ff (diff)
Fix matching stacked extbans.
-rw-r--r--include/modes.h5
-rw-r--r--modules/protocol/inspircd.cpp2
-rw-r--r--modules/protocol/unrealircd.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/include/modes.h b/include/modes.h
index 0198e6843..aa40c0a4d 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -216,9 +216,12 @@ template<typename T>
class CoreExport ChannelModeVirtual
: public T
{
- Anope::string base;
+private:
ChannelMode *basech;
+protected:
+ Anope::string base;
+
public:
ChannelModeVirtual(const Anope::string &mname, const Anope::string &basename);
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp
index b3e44b464..cb0724046 100644
--- a/modules/protocol/inspircd.cpp
+++ b/modules/protocol/inspircd.cpp
@@ -871,7 +871,7 @@ namespace InspIRCdExtBan
bool Matches(User *u, const Entry *e) override
{
- return !u->Account() && Entry("BAN", e->GetMask()).Matches(u);
+ return !u->Account() && Entry(this->base, e->GetMask()).Matches(u);
}
};
diff --git a/modules/protocol/unrealircd.cpp b/modules/protocol/unrealircd.cpp
index 75a68bf6f..8902396fd 100644
--- a/modules/protocol/unrealircd.cpp
+++ b/modules/protocol/unrealircd.cpp
@@ -555,7 +555,7 @@ namespace UnrealExtBan
bool Matches(User *u, const Entry *e) override
{
- return Entry(this->name, e->GetMask()).Matches(u);
+ return Entry(this->base, e->GetMask()).Matches(u);
}
};