]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_gnutls.cpp
Change the SQLutils and SQL providers to also use interfaces for proper unload order...
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_gnutls.cpp
index 4a604ba9a84ef24c5f7effe0c9c6eb2751b777df..1e6208b660e96ab38977a8d624c5ec9bcf761071 100644 (file)
@@ -1,3 +1,16 @@
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
 #include <string>
 #include <vector>
 
@@ -267,7 +280,16 @@ class ModuleSSLGnuTLS : public Module
                }
                else if (strcmp("IS_HOOK", request->GetId()) == 0)
                {
-                       return ServerInstance->Config->AddIOHook((Module*)this, (InspSocket*)ISR->Sock) ? (char*)"OK" : NULL;
+                       char* ret = "OK";
+                       try
+                       {
+                               ret = ServerInstance->Config->AddIOHook((Module*)this, (InspSocket*)ISR->Sock) ? (char*)"OK" : NULL;
+                       }
+                       catch (ModuleException &e)
+                       {
+                               return NULL;
+                       }
+                       return ret;
                }
                else if (strcmp("IS_UNHOOK", request->GetId()) == 0)
                {