]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_mlock.cpp
Various improvements to UNIX socket support.
[user/henk/code/inspircd.git] / src / modules / m_mlock.cpp
index d3ab5b9fd2af0700fb6b26e2e95cad0b59183020..59748048e6fb7174b2150f63a1f0ac1c87b21f67 100644 (file)
 
 #include "inspircd.h"
 
+enum
+{
+       // From Charybdis.
+       ERR_MLOCKRESTRICTED = 742
+};
+
 class ModuleMLock : public Module
 {
        StringExtItem mlock;
@@ -31,10 +37,10 @@ class ModuleMLock : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Implements the ability to have server-side MLOCK enforcement.", VF_VENDOR);
+               return Version("Implements the ability to have server-side MLOCK enforcement", VF_VENDOR);
        }
 
-       ModResult OnRawMode(User* source, Channel* channel, ModeHandler* mh, const std::string& parameter, bool adding)
+       ModResult OnRawMode(User* source, Channel* channel, ModeHandler* mh, const std::string& parameter, bool adding) CXX11_OVERRIDE
        {
                if (!channel)
                        return MOD_RES_PASSTHRU;
@@ -50,7 +56,7 @@ class ModuleMLock : public Module
                std::string::size_type p = mlock_str->find(mode);
                if (p != std::string::npos)
                {
-                       source->WriteNumeric(742, channel->name, mode, *mlock_str, "MODE cannot be set due to channel having an active MLOCK restriction policy");
+                       source->WriteNumeric(ERR_MLOCKRESTRICTED, channel->name, mode, *mlock_str, "MODE cannot be set due to the channel having an active MLOCK restriction policy");
                        return MOD_RES_DENY;
                }