summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-02-27 12:16:25 +0000
committerSadie Powell <sadie@witchery.services>2020-03-05 20:47:18 +0000
commit8d1255a82c1bdb53928a007be113caff15683d53 (patch)
tree1873579e5b622f492975a721cd5ddcc864271d8c /src/command_parse.cpp
parent600ea3b38fde78c8105f94c39772dea8043f0573 (diff)
Move command stuff to a more appropriate source file.
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index f8c88a9f0..11d3cf15b 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -325,48 +325,6 @@ void CommandParser::RemoveCommand(Command* x)
cmdlist.erase(n);
}
-CommandBase::CommandBase(Module* mod, const std::string& cmd, unsigned int minpara, unsigned int maxpara)
- : ServiceProvider(mod, cmd, SERVICE_COMMAND)
- , min_params(minpara)
- , max_params(maxpara)
- , allow_empty_last_param(true)
-{
-}
-
-CommandBase::~CommandBase()
-{
-}
-
-void CommandBase::EncodeParameter(std::string& parameter, unsigned int index)
-{
-}
-
-RouteDescriptor CommandBase::GetRouting(User* user, const Params& parameters)
-{
- return ROUTE_LOCALONLY;
-}
-
-Command::Command(Module* mod, const std::string& cmd, unsigned int minpara, unsigned int maxpara)
- : CommandBase(mod, cmd, minpara, maxpara)
- , flags_needed(0)
- , force_manual_route(false)
- , Penalty(1)
- , use_count(0)
- , works_before_reg(false)
-{
-}
-
-Command::~Command()
-{
- ServerInstance->Parser.RemoveCommand(this);
-}
-
-void Command::RegisterService()
-{
- if (!ServerInstance->Parser.AddCommand(this))
- throw ModuleException("Command already exists: " + name);
-}
-
void CommandParser::ProcessBuffer(LocalUser* user, const std::string& buffer)
{
ClientProtocol::ParseOutput parseoutput;