]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_pgsql.cpp
More (last of extra)
[user/henk/code/inspircd.git] / src / modules / extra / m_pgsql.cpp
index 9ec369859b4c8769d03d267169f31bf1cb8c7136..5d267fc1acce29f481a414efc7aa3c12ecaa3201 100644 (file)
@@ -817,14 +817,11 @@ class ModulePgSQL : public Module
                                ipvalid = inet_pton(AF_INET6, host.host.c_str(), &blargle);
                        }
                        else
+#endif
                        {
                                in_addr blargle;
                                ipvalid = inet_aton(host.host.c_str(), &blargle);
                        }
-#else
-                       in_addr blargle;
-                       ipvalid = inet_aton(host.host.c_str(), &blargle);
-#endif
 
                        if(ipvalid > 0)
                        {
@@ -983,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;
-}