]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictmsg.cpp
Fix potential for duplicate SID if the SID is auto generated.
[user/henk/code/inspircd.git] / src / modules / m_restrictmsg.cpp
index ce62296acb89d676616a2583a4fed841ae363210..b5f10eb244976a5d38cec4908266e247189cf890 100644 (file)
  * ---------------------------------------------------
  */
 
-#include <stdio.h>
-#include <string>
-#include <vector>
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-
 #include "inspircd.h"
 
 /* $ModDesc: Forbids users from messaging each other. Users may still message opers and opers may message other opers. */
@@ -29,7 +22,7 @@ class ModuleRestrictMsg : public Module
  public:
  
        ModuleRestrictMsg(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
                
        }
@@ -76,28 +69,4 @@ class ModuleRestrictMsg : public Module
        }
 };
 
-
-class ModuleRestrictMsgFactory : public ModuleFactory
-{
- public:
-       ModuleRestrictMsgFactory()
-       {
-       }
-       
-       ~ModuleRestrictMsgFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleRestrictMsg(Me);
-       }
-       
-};
-
-
-extern "C" void * init_module( void )
-{
-       return new ModuleRestrictMsgFactory;
-}
-
+MODULE_INIT(ModuleRestrictMsg)