]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/testsuite.cpp
Add Module::init() for correct exception handling during hook registration
[user/henk/code/inspircd.git] / src / testsuite.cpp
index bc68cb5f108c360ee95eb025bddcf076547e6d67..c61e106b66f5dbbea06bc7e980dd686b60adfcd2 100644 (file)
@@ -2,7 +2,7 @@
  *        | Inspire Internet Relay Chat Daemon |
  *        +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -79,7 +79,11 @@ TestSuite::TestSuite()
                        case '3':
                                cout << "Enter module filename to unload: ";
                                cin >> modname;
-                               cout << (ServerInstance->Modules->Unload(modname.c_str()) ? "\nSUCCESS!\n" : "\nFAILURE\n");
+                               {
+                                       Module* m = ServerInstance->Modules->Find(modname);
+                                       cout << (ServerInstance->Modules->Unload(m) ? "\nSUCCESS!\n" : "\nFAILURE\n");
+                                       ServerInstance->AtomicActions.Run();
+                               }
                                break;
                        case '4':
                                cout << (DoThreadTests() ? "\nSUCCESS!\n" : "\nFAILURE\n");