From cbe5b993142c218e09ae972bdce91681cc0ba485 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 4 Apr 2020 11:49:06 +0100 Subject: Add the Numerics::CannotSendTo class and switch stuff to use it. --- src/modules/m_restrictmsg.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/modules/m_restrictmsg.cpp') diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index b6c82ee76..1bb90a360 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -43,10 +43,9 @@ class ModuleRestrictMsg // (3) the recipient is on a ulined server // anything else, blocked. if (u->IsOper() || user->IsOper() || u->server->IsULine()) - { return MOD_RES_PASSTHRU; - } - user->WriteNumeric(ERR_CANTSENDTOUSER, u->nick, "You are not permitted to send private messages to this user"); + + user->WriteNumeric(Numerics::CannotSendTo(u, "You cannot send messages to this user.")); return MOD_RES_DENY; } -- cgit v1.3.1-10-gc9f91