]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.h
Merge pull request #495 from SaberUK/master+fix-libcpp
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.h
index 3997c148c082c86dbce2514f8d33934e0bd1d60d..8cc2d984f6906fb06a3ae3728b6f5fc5acdc9a9f 100644 (file)
@@ -1,21 +1,29 @@
-/*       +------------------------------------+
- *       | 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>
+ *   Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
+ *   Copyright (C) 2007-2008 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2007 Dennis Friis <peavey@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/>.
  */
 
-#ifndef __ST_MAIN__
-#define __ST_MAIN__
+
+#pragma once
 
 #include "inspircd.h"
-#include <stdarg.h>
 
 /** If you make a change which breaks the protocol, increment this.
  * If you  completely change the protocol, completely change the number.
  * Failure to document your protocol changes will result in a painfully
  * painful death by pain. You have been warned.
  */
-const long ProtocolVersion = 1202;
-const long MinCompatProtocol = 1201;
+const long ProtocolVersion = 1205;
+const long MinCompatProtocol = 1202;
 
 /** Forward declarations
  */
-class CommandRConnect;
-class CommandRSQuit;
-class CommandSVSJoin;
-class CommandSVSPart;
-class CommandSVSNick;
+class SpanningTreeCommands;
 class SpanningTreeUtilities;
 class CacheRefreshTimer;
 class TreeServer;
@@ -46,16 +50,12 @@ class Autoconnect;
  */
 class ModuleSpanningTree : public Module
 {
-       CommandRConnect* command_rconnect;
-       CommandRSQuit* command_rsquit;
-       CommandSVSJoin* command_svsjoin;
-       CommandSVSPart* command_svspart;
-       CommandSVSNick* command_svsnick;
-       SpanningTreeUtilities* Utils;
-
-       void RedoConfig(Module* mod);
+       SpanningTreeCommands* commands;
+       void LocalMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list, const char* message_type);
 
  public:
+       SpanningTreeUtilities* Utils;
+
        CacheRefreshTimer *RefreshTimer;
        /** Set to true if inside a spanningtree call, to prevent sending
         * xlines and other things back to their source
@@ -65,6 +65,7 @@ class ModuleSpanningTree : public Module
        /** Constructor
         */
        ModuleSpanningTree();
+       void init();
 
        /** Shows /LINKS
         */
@@ -82,18 +83,6 @@ class ModuleSpanningTree : public Module
         */
        void ShowMap(TreeServer* Current, User* user, int depth, int &line, char* names, int &maxnamew, char* stats);
 
-       /** Handle remote MOTD
-        */
-       ModResult HandleMotd(const std::vector<std::string>& parameters, User* user);
-
-       /** Handle remote ADMIN
-        */
-       ModResult HandleAdmin(const std::vector<std::string>& parameters, User* user);
-
-       /** Handle remote STATS
-        */
-       ModResult HandleStats(const std::vector<std::string>& parameters, User* user);
-
        /** Handle MAP command
         */
        bool HandleMap(const std::vector<std::string>& parameters, User* user);
@@ -102,10 +91,6 @@ class ModuleSpanningTree : public Module
         */
        ModResult HandleSquit(const std::vector<std::string>& parameters, User* user);
 
-       /** Handle TIME
-        */
-       ModResult HandleTime(const std::vector<std::string>& parameters, User* user);
-
        /** Handle remote WHOIS
         */
        ModResult HandleRemoteWhois(const std::vector<std::string>& parameters, User* user);
@@ -192,5 +177,3 @@ class ModuleSpanningTree : public Module
        Version GetVersion();
        void Prioritize();
 };
-
-#endif