From 3da9b6df0d4a02225f82f809d76fb8f5a27cb6a4 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 4 Oct 2024 19:04:31 +0100 Subject: [PATCH] Fix matching stacked extbans. --- include/modes.h | 5 ++++- modules/protocol/inspircd.cpp | 2 +- modules/protocol/unrealircd.cpp | 2 +- 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 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); } };