diff options
| author | 2024-10-16 10:59:31 +0100 | |
|---|---|---|
| committer | 2024-10-16 10:59:31 +0100 | |
| commit | 4ad525791897a61b110d9defc0bc114b14ed0b36 (patch) | |
| tree | 7b181fd0b3a6a5642cec89982dd6936adeb9e534 /src/modules/m_account.cpp | |
| parent | Add text replies for DNSBL responses. (diff) | |
Also match account bans against grouped nicknames.
Diffstat (limited to 'src/modules/m_account.cpp')
| -rw-r--r-- | src/modules/m_account.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/m_account.cpp b/src/modules/m_account.cpp index a260c7582..c8952dc57 100644 --- a/src/modules/m_account.cpp +++ b/src/modules/m_account.cpp @@ -141,7 +141,17 @@ public: bool IsMatch(User* user, Channel* channel, const std::string& text) override { - const std::string* account = accountapi.GetAccountName(user); + const auto* nicks = accountapi.GetAccountNicks(user); + if (nicks) + { + for (const auto& nick : *nicks) + { + if (InspIRCd::Match(nick, text)) + return true; + } + } + + const auto* account = accountapi.GetAccountName(user); return account && InspIRCd::Match(*account, text); } }; |
