X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fmain.h;h=937e908d3f34421b9331d6c5d11586675885b202;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=a47b3762232ad3937540b7e0c040b1501b1d096b;hpb=cd712c40e1b352c05e7ae0f72e0a5e84cdf64323;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index a47b37622..937e908d3 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -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 + * Copyright (C) 2008 Thomas Stagner + * Copyright (C) 2007-2008 Craig Edwards + * Copyright (C) 2007 Robin Burchell + * Copyright (C) 2007 Dennis Friis * - * 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 . */ -#ifndef __ST_MAIN__ -#define __ST_MAIN__ + +#pragma once #include "inspircd.h" -#include /** If you make a change which breaks the protocol, increment this. * If you completely change the protocol, completely change the number. @@ -27,15 +35,11 @@ * painful death by pain. You have been warned. */ const long ProtocolVersion = 1202; -const long MinCompatProtocol = 1201; +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& parameters, User* user); - - /** Handle remote ADMIN - */ - ModResult HandleAdmin(const std::vector& parameters, User* user); - - /** Handle remote STATS - */ - ModResult HandleStats(const std::vector& parameters, User* user); - /** Handle MAP command */ bool HandleMap(const std::vector& parameters, User* user); @@ -102,10 +91,6 @@ class ModuleSpanningTree : public Module */ ModResult HandleSquit(const std::vector& parameters, User* user); - /** Handle TIME - */ - ModResult HandleTime(const std::vector& parameters, User* user); - /** Handle remote WHOIS */ ModResult HandleRemoteWhois(const std::vector& parameters, User* user); @@ -154,8 +139,8 @@ class ModuleSpanningTree : public Module ** *** MODULE EVENTS *** **/ - ModResult OnPreCommand(std::string &command, std::vector& parameters, User *user, bool validated, const std::string &original_line); - void OnPostCommand(const std::string &command, const std::vector& parameters, User *user, CmdResult result, const std::string &original_line); + ModResult OnPreCommand(std::string &command, std::vector& parameters, LocalUser *user, bool validated, const std::string &original_line); + void OnPostCommand(const std::string &command, const std::vector& parameters, LocalUser *user, CmdResult result, const std::string &original_line); void OnGetServerDescription(const std::string &servername,std::string &description); void OnUserConnect(LocalUser* source); void OnUserInvite(User* source,User* dest,Channel* channel, time_t); @@ -192,5 +177,3 @@ class ModuleSpanningTree : public Module Version GetVersion(); void Prioritize(); }; - -#endif