]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanhistory.cpp
m_callerid Fix memory leak in CallerIDExtInfo::free()
[user/henk/code/inspircd.git] / src / modules / m_chanhistory.cpp
index 482d526ebc3e05d9e413c4521617733a8bfc4c87..5cbc564fbd258dd86276bb6fc22e804882c9aeee 100644 (file)
@@ -119,9 +119,10 @@ class ModuleChanHistory : public Module
        void init()
        {
                ServerInstance->Modules->AddService(m);
+               ServerInstance->Modules->AddService(m.ext);
 
                Implementation eventlist[] = { I_OnPostJoin, I_OnUserMessage, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 3);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
                OnRehash(NULL);
        }
 
@@ -129,12 +130,7 @@ class ModuleChanHistory : public Module
        {
                ConfigTag* tag = ServerInstance->Config->ConfValue("chanhistory");
                m.maxlines = tag->getInt("maxlines", 50);
-               sendnotice = tag->getInt("notice", true);
-       }
-
-       ~ModuleChanHistory()
-       {
-               ServerInstance->Modes->DelMode(&m);
+               sendnotice = tag->getBool("notice", true);
        }
 
        void OnUserMessage(User* user,void* dest,int target_type, const std::string &text, char status, const CUList&)