diff options
| author | 2024-11-01 14:35:23 +0000 | |
|---|---|---|
| committer | 2024-11-01 15:53:04 +0000 | |
| commit | 8a3aba4044ee10df332631c4c66ed60299566e58 (patch) | |
| tree | afb185a313dff83d61c26e3b95f47b62d3ab5694 /modules/account.cpp | |
| parent | Default <options:extbanformat> to name. (diff) | |
| parent | Use fmtlib instead of iostream in ConvToStr where available. (diff) | |
Merge branch 'insp4' into master.
Diffstat (limited to 'modules/account.cpp')
| -rw-r--r-- | modules/account.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/account.cpp b/modules/account.cpp index ac0f09948..205a5e392 100644 --- a/modules/account.cpp +++ b/modules/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); } }; |
