]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_safelist.cpp
Some more to fix still, modules probably wont load correctly atm
[user/henk/code/inspircd.git] / src / modules / m_safelist.cpp
index a2135bd6bb4bade7a57b76e36beacc062b6271ec..3e739cc742ffa669b30956460095e9ef15aa9a14 100644 (file)
@@ -42,6 +42,8 @@ class ModuleSafeList : public Module
        ModuleSafeList(InspIRCd* Me) : Module(Me)
        {
                OnRehash(NULL, "");
+               Implementation eventlist[] = { I_OnBufferFlushed, I_OnPreCommand, I_OnCleanup, I_OnUserQuit, I_On005Numeric, I_OnRehash };
+               ServerInstance->Modules->Attach(eventlist, this, 6);
        }
  
        virtual ~ModuleSafeList()
@@ -168,7 +170,7 @@ class ModuleSafeList : public Module
                if (user->GetExt("safelist_cache", ld))
                {
                        Channel* chan = NULL;
-                       long amount_sent = 0;
+                       unsigned long amount_sent = 0;
                        do
                        {
                                chan = ServerInstance->GetChannelIndex(ld->list_position);
@@ -217,7 +219,7 @@ class ModuleSafeList : public Module
                                }
                                ld->list_position++;
                        }
-                       while ((chan != NULL) && (amount_sent < (user->sendqmax / 4)));
+                       while ((chan != NULL) && (amount_sent < (user->MyClass->GetSendqMax() / 4)));
                        if (ld->list_ended)
                        {
                                user->Shrink("safelist_cache");