diff options
| author | 2021-04-27 10:19:35 +0100 | |
|---|---|---|
| committer | 2021-04-27 10:37:04 +0100 | |
| commit | 8526836cf598b49de6fe8e1cef7a169d3de481f8 (patch) | |
| tree | f9ae452b867f69c6e09913db2dd84ae3fdaba7e3 /src/modules/m_disable.cpp | |
| parent | Use parameter pack expansion instead of recursive calls. (diff) | |
| parent | Fix SendNoticeInternal not having a NULL command variant. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_disable.cpp')
| -rw-r--r-- | src/modules/m_disable.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp index ddfea5811..04e18eb90 100644 --- a/src/modules/m_disable.cpp +++ b/src/modules/m_disable.cpp @@ -173,8 +173,9 @@ class ModuleDisable : public Module { // The server administrator has specified that disabled modes should be // treated as if they do not exist. - user->WriteNumeric(change.mh->GetModeType() == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK, - change.mh->GetModeChar(), "is an unknown mode character"); + int numeric = (change.mh->GetModeType() == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK); + const char* typestr = (change.mh->GetModeType() == MODETYPE_CHANNEL ? "channel" : "user"); + user->WriteNumeric(numeric, change.mh->GetModeChar(), InspIRCd::Format("is not a recognised %s mode.", typestr)); return MOD_RES_DENY; } |
