]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_xmlsocket.cpp
Allow support for multiple dns results per request. This is a significant change...
[user/henk/code/inspircd.git] / src / modules / m_xmlsocket.cpp
index face79635ae2d99b80b51724b62d77675c9b146e..7f37f66c91dcb1a75366c79463bb825da517d470 100644 (file)
@@ -47,7 +47,8 @@ class ModuleXMLSocket : public Module
                for (int i = 0; i < Conf->Enumerate("bind"); i++)
                {
                        // For each <bind> tag
-                       if (((Conf->ReadValue("bind", "type", i) == "") || (Conf->ReadValue("bind", "type", i) == "clients")) && (Conf->ReadFlag("bind", "xmlsocket", i)))
+                       std::string x = Conf->ReadValue("bind", "type", i);
+                       if (((x.empty()) || (x == "clients")) && (Conf->ReadFlag("bind", "xmlsocket", i)))
                        {
                                // Get the port we're meant to be listening on with SSL
                                std::string port = Conf->ReadValue("bind", "port", i);
@@ -165,25 +166,5 @@ class ModuleXMLSocket : public Module
 
 };
 
-class ModuleXMLSocketFactory : public ModuleFactory
-{
- public:
-       ModuleXMLSocketFactory()
-       {
-       }
-
-       ~ModuleXMLSocketFactory()
-       {
-       }
+MODULE_INIT(ModuleXMLSocket)
 
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleXMLSocket(Me);
-       }
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleXMLSocketFactory;
-}