diff options
author | Sadie Powell <sadie@witchery.services> | 2021-04-19 17:52:38 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-04-19 17:53:46 +0100 |
commit | bde0e7e84668df48afaffda7a52eddc0aca543d3 (patch) | |
tree | bcbde0ba8c548da5ea917db2047f2c1dcf56e1f4 /src/mode.cpp | |
parent | 033127f583ba344dfe2306f37325ef3987fd42e3 (diff) |
Improve the message sent when a mode does not exist.
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 306d39c5d..3ce7ee10f 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -388,7 +388,9 @@ void ModeParser::ModeParamsToChangeList(User* user, ModeType type, const std::ve if (!mh) { /* No mode handler? Unknown mode character then. */ - user->WriteNumeric(type == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK, modechar, "is an unknown mode character"); + int numeric = (type == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK); + const char* typestr = (type == MODETYPE_CHANNEL ? "channel" : "user"); + user->WriteNumeric(numeric, modechar, InspIRCd::Format("is not a recognised %s mode.", typestr)); continue; } |