summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-04-19 17:52:38 +0100
committerSadie Powell <sadie@witchery.services>2021-04-19 17:53:46 +0100
commitbde0e7e84668df48afaffda7a52eddc0aca543d3 (patch)
treebcbde0ba8c548da5ea917db2047f2c1dcf56e1f4 /src/modules
parent033127f583ba344dfe2306f37325ef3987fd42e3 (diff)
Improve the message sent when a mode does not exist.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_disable.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp
index 95fcd8b4c..6ba5243c9 100644
--- a/src/modules/m_disable.cpp
+++ b/src/modules/m_disable.cpp
@@ -171,8 +171,9 @@ class ModuleDisable : public Module
{
// The server administrator has specified that disabled modes should be
// treated as if they do not exist.
- user->WriteNumeric(mh->GetModeType() == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK,
- mh->GetModeChar(), "is an unknown mode character");
+ int numeric = (mh->GetModeType() == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK);
+ const char* typestr = (mh->GetModeType() == MODETYPE_CHANNEL ? "channel" : "user");
+ user->WriteNumeric(numeric, mh->GetModeChar(), InspIRCd::Format("is not a recognised %s mode.", typestr));
return MOD_RES_DENY;
}