diff options
| author | 2026-03-06 14:52:07 +0000 | |
|---|---|---|
| committer | 2026-03-06 14:54:25 +0000 | |
| commit | 26964c6f5a73b4e28fd89cacbffb1dbf13641e2f (patch) | |
| tree | 13ede98fa53ddc765fc943076c3772192c53941b /src | |
| parent | Deduplicate command usability checks into Command::IsUsableBy. (diff) | |
Backport the abbreviation module checking IsUsableBy from master.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/m_abbreviation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp index 6ec1ecfe5..f204a5a96 100644 --- a/src/modules/m_abbreviation.cpp +++ b/src/modules/m_abbreviation.cpp @@ -54,9 +54,9 @@ public: std::string foundcommand; std::string matchlist; bool foundmatch = false; - for (const auto& [cmdname, _] : ServerInstance->Parser.GetCommands()) + for (const auto& [cmdname, cmd] : ServerInstance->Parser.GetCommands()) { - if (!command.compare(0, clen, cmdname, 0, clen)) + if (!command.compare(0, clen, cmdname, 0, clen) && cmd->IsUsableBy(user)) { if (matchlist.length() > 450) { |
