summaryrefslogtreecommitdiff
path: root/src/modules/m_delaymsg.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-04-04 11:49:06 +0100
committerSadie Powell <sadie@witchery.services>2020-04-04 12:31:14 +0100
commitcbe5b993142c218e09ae972bdce91681cc0ba485 (patch)
tree61e925088e25c4ba7e1e011929fb13555400c42a /src/modules/m_delaymsg.cpp
parentcad2f3f979b2fc45bcfa7c7b7652bbe201a5b0a0 (diff)
Add the Numerics::CannotSendTo class and switch stuff to use it.
Diffstat (limited to 'src/modules/m_delaymsg.cpp')
-rw-r--r--src/modules/m_delaymsg.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp
index 84b5c8353..0952cbf96 100644
--- a/src/modules/m_delaymsg.cpp
+++ b/src/modules/m_delaymsg.cpp
@@ -141,7 +141,8 @@ ModResult ModuleDelayMsg::HandleMessage(User* user, const MessageTarget& target,
{
if (channel->GetPrefixValue(user) < VOICE_VALUE)
{
- user->WriteNumeric(ERR_CANNOTSENDTOCHAN, channel->name, InspIRCd::Format("You must wait %d seconds after joining to send to the channel (+d is set)", len));
+ const std::string message = InspIRCd::Format("You cannot send messages to this channel until you have been a member for %d seconds.", len);
+ user->WriteNumeric(Numerics::CannotSendTo(channel, message));
return MOD_RES_DENY;
}
}