2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2010 Daniel De Graaf <danieldg@inspircd.org>
6 * This file is part of InspIRCd. InspIRCd is free software: you can
7 * redistribute it and/or modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation, version 2.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef M_SPANNINGTREE_COMMANDS_H
21 #define M_SPANNINGTREE_COMMANDS_H
27 class CommandRConnect : public Command
29 SpanningTreeUtilities* Utils; /* Utility class */
31 CommandRConnect (Module* Callback, SpanningTreeUtilities* Util);
32 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
33 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
36 class CommandRSQuit : public Command
38 SpanningTreeUtilities* Utils; /* Utility class */
40 CommandRSQuit(Module* Callback, SpanningTreeUtilities* Util);
41 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
42 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
43 void NoticeUser(User* user, const std::string &msg);
46 class CommandSVSJoin : public Command
49 CommandSVSJoin(Module* Creator) : Command(Creator, "SVSJOIN", 2) { flags_needed = FLAG_SERVERONLY; }
50 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
51 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
53 class CommandSVSPart : public Command
56 CommandSVSPart(Module* Creator) : Command(Creator, "SVSPART", 2) { flags_needed = FLAG_SERVERONLY; }
57 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
58 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
60 class CommandSVSNick : public Command
63 CommandSVSNick(Module* Creator) : Command(Creator, "SVSNICK", 3) { flags_needed = FLAG_SERVERONLY; }
64 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
65 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
67 class CommandMetadata : public Command
70 CommandMetadata(Module* Creator) : Command(Creator, "METADATA", 2) { flags_needed = FLAG_SERVERONLY; }
71 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
72 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
74 class CommandUID : public Command
77 CommandUID(Module* Creator) : Command(Creator, "UID", 10) { flags_needed = FLAG_SERVERONLY; }
78 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
79 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
81 class CommandOpertype : public Command
84 CommandOpertype(Module* Creator) : Command(Creator, "OPERTYPE", 1) { flags_needed = FLAG_SERVERONLY; }
85 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
86 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
88 class CommandFJoin : public Command
91 CommandFJoin(Module* Creator) : Command(Creator, "FJOIN", 3) { flags_needed = FLAG_SERVERONLY; }
92 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
93 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
94 /** Remove all modes from a channel, including statusmodes (+qaovh etc), simplemodes, parameter modes.
95 * This does not update the timestamp of the target channel, this must be done seperately.
97 void RemoveStatus(User* source, parameterlist ¶ms);
99 class CommandFMode : public Command
102 CommandFMode(Module* Creator) : Command(Creator, "FMODE", 3) { flags_needed = FLAG_SERVERONLY; }
103 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
104 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
106 class CommandFTopic : public Command
109 CommandFTopic(Module* Creator) : Command(Creator, "FTOPIC", 4) { flags_needed = FLAG_SERVERONLY; }
110 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
111 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
113 class CommandFHost : public Command
116 CommandFHost(Module* Creator) : Command(Creator, "FHOST", 1) { flags_needed = FLAG_SERVERONLY; }
117 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
118 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
120 class CommandFIdent : public Command
123 CommandFIdent(Module* Creator) : Command(Creator, "FIDENT", 1) { flags_needed = FLAG_SERVERONLY; }
124 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
125 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
127 class CommandFName : public Command
130 CommandFName(Module* Creator) : Command(Creator, "FNAME", 1) { flags_needed = FLAG_SERVERONLY; }
131 CmdResult Handle (const std::vector<std::string>& parameters, User *user);
132 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_BROADCAST; }
135 class SpanningTreeCommands
138 CommandRConnect rconnect;
139 CommandRSQuit rsquit;
140 CommandSVSJoin svsjoin;
141 CommandSVSPart svspart;
142 CommandSVSNick svsnick;
143 CommandMetadata metadata;
145 CommandOpertype opertype;
148 CommandFTopic ftopic;
150 CommandFIdent fident;
152 SpanningTreeCommands(ModuleSpanningTree* module);