]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delaymsg.cpp
Add a Flash Policy Daemon module
[user/henk/code/inspircd.git] / src / modules / m_delaymsg.cpp
index cc22a39263ce71699e33621d72ef26a20e8f1a26..031680e189cacb5d3ed6b673f99ba9b4bd0963ad 100644 (file)
@@ -45,13 +45,6 @@ class ModuleDelayMsg : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               ServerInstance->Modules->AddService(djm);
-               ServerInstance->Modules->AddService(djm.jointime);
-               Implementation eventlist[] = { I_OnUserJoin, I_OnUserPreMessage};
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-       }
        Version GetVersion() CXX11_OVERRIDE;
        void OnUserJoin(Membership* memb, bool sync, bool created, CUList&) CXX11_OVERRIDE;
        ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE;
@@ -127,8 +120,8 @@ ModResult ModuleDelayMsg::OnUserPreMessage(User* user, void* dest, int target_ty
        {
                if (channel->GetPrefixValue(user) < VOICE_VALUE)
                {
-                       user->WriteNumeric(404, "%s %s :You must wait %s seconds after joining to send to channel (+d)",
-                               user->nick.c_str(), channel->name.c_str(), len.c_str());
+                       user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s :You must wait %s seconds after joining to send to channel (+d)",
+                               channel->name.c_str(), len.c_str());
                        return MOD_RES_DENY;
                }
        }