]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockcaps.cpp
Header update: 2007 -> 2008
[user/henk/code/inspircd.git] / src / modules / m_blockcaps.cpp
index c041feb31af565b0871467573b654f919ceeeb47..1992c584121e4d13a1a7baeb3994ee24ff7fb7c2 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -59,7 +59,10 @@ public:
                OnRehash(NULL,"");
                bc = new BlockCaps(ServerInstance);
                if (!ServerInstance->AddMode(bc))
+               {
+                       delete bc;
                        throw ModuleException("Could not add new modes!");
+               }
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }