diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_filter_pcre.cpp | 25 | ||||
-rw-r--r-- | src/modules/extra/m_httpclienttest.cpp | 23 | ||||
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 26 | ||||
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 23 | ||||
-rw-r--r-- | src/modules/extra/m_sqlauth.cpp | 23 | ||||
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 21 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 23 |
7 files changed, 7 insertions, 157 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index 194c04816..035d632ca 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -177,29 +177,6 @@ class ModuleFilterPCRE : public FilterBase return 0; } }; - -class ModuleFilterPCREFactory : public ModuleFactory -{ - public: - ModuleFilterPCREFactory() - { - } - - ~ModuleFilterPCREFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new ModuleFilterPCRE(Me); - } - -}; - - -extern "C" DllExport void * init_module( void ) -{ - return new ModuleFilterPCREFactory; -} +MODULE_INIT(ModuleFilterPCRE); diff --git a/src/modules/extra/m_httpclienttest.cpp b/src/modules/extra/m_httpclienttest.cpp index 5ec097aaf..90e7a5159 100644 --- a/src/modules/extra/m_httpclienttest.cpp +++ b/src/modules/extra/m_httpclienttest.cpp @@ -77,26 +77,5 @@ public: }; -class MyModuleFactory : public ModuleFactory -{ -public: - MyModuleFactory() - { - } - - ~MyModuleFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new MyModule(Me); - } - -}; - -extern "C" void * init_module( void ) -{ - return new MyModuleFactory; -} +MODULE_INIT(MyModule); diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 1b83617d6..6605bed3c 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -885,29 +885,5 @@ void* DispatcherThread(void* arg) return NULL; } +MODULE_INIT(ModuleSQL); -// stuff down here is the module-factory stuff. For basic modules you can ignore this. - -class ModuleSQLFactory : public ModuleFactory -{ - public: - ModuleSQLFactory() - { - } - - ~ModuleSQLFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new ModuleSQL(Me); - } - -}; - - -extern "C" void * init_module( void ) -{ - return new ModuleSQLFactory; -} diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 57c049f30..5d267fc1a 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -980,26 +980,5 @@ void SQLConn::DelayReconnect() ((ModulePgSQL*)us)->ReconnectConn(this); } +MODULE_INIT(ModulePgSQL); -class ModulePgSQLFactory : public ModuleFactory -{ - public: - ModulePgSQLFactory() - { - } - - ~ModulePgSQLFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new ModulePgSQL(Me); - } -}; - - -extern "C" void * init_module( void ) -{ - return new ModulePgSQLFactory; -} diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index 36dcb0952..6b05ee521 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -190,26 +190,5 @@ public: }; -class ModuleSQLAuthFactory : public ModuleFactory -{ - public: - ModuleSQLAuthFactory() - { - } - - ~ModuleSQLAuthFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new ModuleSQLAuth(Me); - } - -}; - +MODULE_INIT(ModuleSQLAuth); -extern "C" void * init_module( void ) -{ - return new ModuleSQLAuthFactory; -} diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 88b5aebcd..735591496 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -656,24 +656,5 @@ void ResultNotifier::Dispatch() ((ModuleSQLite3*)mod)->SendQueue();
}
-class ModuleSQLite3Factory : public ModuleFactory
-{
- public:
- ModuleSQLite3Factory()
- {
- }
-
- ~ModuleSQLite3Factory()
- {
- }
+MODULE_INIT(ModuleSQLite3);
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new ModuleSQLite3(Me);
- }
-};
-
-extern "C" void * init_module( void )
-{
- return new ModuleSQLite3Factory;
-}
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 3fdb26875..97941cb5d 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -1387,26 +1387,5 @@ Priority ModuleSpanningTree::Prioritize() return PRIORITY_LAST; } -class ModuleSpanningTreeFactory : public ModuleFactory -{ - public: - ModuleSpanningTreeFactory() - { - } - - ~ModuleSpanningTreeFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new ModuleSpanningTree(Me); - } - -}; +MODULE_INIT(ModuleSpanningTree); - -extern "C" DllExport void * init_module( void ) -{ - return new ModuleSpanningTreeFactory; -} |