]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_testnet.cpp
ISupportManager: Tidy-up, expand comments
[user/henk/code/inspircd.git] / src / modules / m_testnet.cpp
index faa0c7b2e844aa3583bb69c2798d7e038f10accf..0aeeebb888aba911f763db78c17d550ca233d5d9 100644 (file)
@@ -1,16 +1,22 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
  *
- *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
  *
- * This program is free but copyrighted software; see
- *         the file COPYING for details.
+ * This file is part of InspIRCd.  InspIRCd is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version 2.
  *
- * ---------------------------------------------------
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+
 /* $ModDesc: Provides a module for testing the server while linked in a network */
 
 #include "inspircd.h"
@@ -18,6 +24,7 @@
 struct vtbase
 {
        virtual void isok(const char* name, int impl, Module* basemod, std::vector<std::string>& allmods) = 0;
+       virtual ~vtbase() {}
 };
 
 template<typename T> struct vtable : public vtbase
@@ -105,10 +112,8 @@ static void checkall(Module* noimpl)
        CHK(OnUserPreInvite);
        CHK(OnUserInvite);
        CHK(OnUserPreMessage);
-       CHK(OnUserPreNotice);
        CHK(OnUserPreNick);
        CHK(OnUserMessage);
-       CHK(OnUserNotice);
        CHK(OnMode);
        CHK(OnGetServerDescription);
        CHK(OnSyncUser);
@@ -145,8 +150,6 @@ static void checkall(Module* noimpl)
        CHK(OnEvent);
        CHK(OnGlobalOper);
        CHK(OnPostConnect);
-       CHK(OnAddBan);
-       CHK(OnDelBan);
        CHK(OnChangeLocalUserGECOS);
        CHK(OnUserRegister);
        CHK(OnChannelPreDelete);
@@ -169,7 +172,6 @@ static void checkall(Module* noimpl)
        CHK(OnModuleRehash);
        CHK(OnSendWhoLine);
        CHK(OnChangeIdent);
-       CHK(OnChannelRestrictionApply);
 }
 
 class CommandTest : public Command
@@ -207,17 +209,20 @@ class ModuleTest : public Module
        CommandTest cmd;
  public:
        ModuleTest() : cmd(this)
+       {
+       }
+
+       void init() CXX11_OVERRIDE
        {
                if (!strstr(ServerInstance->Config->ServerName.c_str(), ".test"))
                        throw ModuleException("Don't load modules without reading their descriptions!");
-               ServerInstance->AddCommand(&cmd);
+               ServerInstance->Modules->AddService(cmd);
        }
 
-       Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides a module for testing the server while linked in a network", VF_VENDOR|VF_OPTCOMMON);
        }
 };
 
 MODULE_INIT(ModuleTest)
-