]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictmsg.cpp
Add the Numerics::CannotSendTo class and switch stuff to use it.
[user/henk/code/inspircd.git] / src / modules / m_restrictmsg.cpp
index b6c82ee769609c3c2d95886a0c074e4f15c164de..1bb90a3607a20cfec0f33e0ea51efb0c5570f9cb 100644 (file)
@@ -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;
                }