]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_services.cpp
All modules which implement simplemodes (no parameters, not a list mode) can now...
[user/henk/code/inspircd.git] / src / modules / m_services.cpp
index 21ab31f6bc12b1df291caf2e9f1f754d43561811..f652c0fc26801d256a00bc16f88bd2f12c7e4a3c 100644 (file)
 
 using namespace std;
 
-#include <stdio.h>
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include <string>
-#include "helperfuncs.h"
-#include "commands.h"
-#include "hashcomp.h"
 #include "inspircd.h"
 
 static bool kludgeme = false;
 
 /* $ModDesc: Povides support for services +r user/chan modes and more */
 
-
-
 class Channel_r : public ModeHandler
 {
        
@@ -189,11 +182,6 @@ class ModuleServices : public Module
                kludgeme = false;
        }
 
-       virtual void On005Numeric(std::string &output)
-       {
-               ServerInstance->Modes->InsertMode(output, "rRM", 4);
-       }
-
        /* <- :stitch.chatspike.net 307 w00t w00t :is a registered nick */
        virtual void OnWhois(userrec* source, userrec* dest)
        {
@@ -206,7 +194,7 @@ class ModuleServices : public Module
 
        void Implements(char* List)
        {
-               List[I_OnWhois] = List[I_OnUserPostNick] = List[I_OnUserPreMessage] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1;
+               List[I_OnWhois] = List[I_OnUserPostNick] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1;
        }
 
        virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
@@ -287,6 +275,12 @@ class ModuleServices : public Module
 
        virtual ~ModuleServices()
        {
+               kludgeme = true;
+               ServerInstance->Modes->DelMode(m1);
+               ServerInstance->Modes->DelMode(m2);
+               ServerInstance->Modes->DelMode(m3);
+               ServerInstance->Modes->DelMode(m4);
+               ServerInstance->Modes->DelMode(m5);
                DELETE(m1);
                DELETE(m2);
                DELETE(m3);
@@ -296,7 +290,7 @@ class ModuleServices : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
+               return Version(1,0,0,0,VF_COMMON|VF_VENDOR);
        }
 };