summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/commands.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-18 23:49:23 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-18 23:49:23 +0000
commitdce58b1611e275118d418bfb3b4402bd14d279dd (patch)
treee0c036dd49d629b7add3f079c17851198270f404 /src/modules/m_spanningtree/commands.h
parent98f2ecb01456dcb9b47bd0c89e88cd49d6d5205d (diff)
Move lots of spanningtree items to commands
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12296 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/commands.h')
-rw-r--r--src/modules/m_spanningtree/commands.h95
1 files changed, 92 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/commands.h b/src/modules/m_spanningtree/commands.h
index 0eb90efb8..eebfd88d3 100644
--- a/src/modules/m_spanningtree/commands.h
+++ b/src/modules/m_spanningtree/commands.h
@@ -14,6 +14,8 @@
#ifndef __COMMANDS_H__
#define __COMMANDS_H__
+#include "main.h"
+
/** Handle /RCONNECT
*/
class CommandRConnect : public Command
@@ -38,23 +40,110 @@ class CommandRSQuit : public Command
class CommandSVSJoin : public Command
{
public:
- CommandSVSJoin(Module* Creator) : Command(Creator, "SVSJOIN", 2) { flags_needed = 'o'; }
+ CommandSVSJoin(Module* Creator) : Command(Creator, "SVSJOIN", 2) { flags_needed = FLAG_SERVERONLY; }
CmdResult Handle (const std::vector<std::string>& parameters, User *user);
RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
};
class CommandSVSPart : public Command
{
public:
- CommandSVSPart(Module* Creator) : Command(Creator, "SVSPART", 2) { flags_needed = 'o'; }
+ CommandSVSPart(Module* Creator) : Command(Creator, "SVSPART", 2) { flags_needed = FLAG_SERVERONLY; }
CmdResult Handle (const std::vector<std::string>& parameters, User *user);
RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
};
class CommandSVSNick : public Command
{
public:
- CommandSVSNick(Module* Creator) : Command(Creator, "SVSNICK", 2) { flags_needed = 'o'; }
+ CommandSVSNick(Module* Creator) : Command(Creator, "SVSNICK", 2) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+class CommandMetadata : public Command
+{
+ public:
+ CommandMetadata(Module* Creator) : Command(Creator, "METADATA", 2) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+class CommandUID : public Command
+{
+ public:
+ CommandUID(Module* Creator) : Command(Creator, "UID", 10) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+class CommandOpertype : public Command
+{
+ public:
+ CommandOpertype(Module* Creator) : Command(Creator, "OPERTYPE", 1) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+class CommandFJoin : public Command
+{
+ public:
+ CommandFJoin(Module* Creator) : Command(Creator, "FJOIN", 3) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+ /** Remove all modes from a channel, including statusmodes (+qaovh etc), simplemodes, parameter modes.
+ * This does not update the timestamp of the target channel, this must be done seperately.
+ */
+ void RemoveStatus(User* source, parameterlist &params);
+};
+class CommandFMode : public Command
+{
+ public:
+ CommandFMode(Module* Creator) : Command(Creator, "FMODE", 3) { flags_needed = FLAG_SERVERONLY; }
CmdResult Handle (const std::vector<std::string>& parameters, User *user);
RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
};
+class CommandFTopic : public Command
+{
+ public:
+ CommandFTopic(Module* Creator) : Command(Creator, "FTOPIC", 4) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+class CommandFHost : public Command
+{
+ public:
+ CommandFHost(Module* Creator) : Command(Creator, "FHOST", 1) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+class CommandFIdent : public Command
+{
+ public:
+ CommandFIdent(Module* Creator) : Command(Creator, "FIDENT", 1) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+class CommandFName : public Command
+{
+ public:
+ CommandFName(Module* Creator) : Command(Creator, "FNAME", 1) { flags_needed = FLAG_SERVERONLY; }
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+
+class SpanningTreeCommands
+{
+ public:
+ CommandRConnect rconnect;
+ CommandRSQuit rsquit;
+ CommandSVSJoin svsjoin;
+ CommandSVSPart svspart;
+ CommandSVSNick svsnick;
+ CommandMetadata metadata;
+ CommandUID uid;
+ CommandOpertype opertype;
+ CommandFJoin fjoin;
+ CommandFMode fmode;
+ CommandFTopic ftopic;
+ CommandFHost fhost;
+ CommandFIdent fident;
+ CommandFName fname;
+ SpanningTreeCommands(ModuleSpanningTree* module);
+};
#endif