summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-06 14:52:07 +0000
committerGravatar Sadie Powell2026-03-06 14:54:25 +0000
commit26964c6f5a73b4e28fd89cacbffb1dbf13641e2f (patch)
tree13ede98fa53ddc765fc943076c3772192c53941b /src
parentDeduplicate 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.cpp4
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)
{