X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommand_parse.cpp;h=c93dac65fd386c05bff39ae57307c87dde5117e0;hb=7492344e64491cea6bbb5c9354dceb804bb908ac;hp=ed996e83ce3af2f73790daa6c22ae42536fb819d;hpb=3a3ff949670c61a4a8856e1391222e156eb1cd17;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/command_parse.cpp b/src/command_parse.cpp index ed996e83c..c93dac65f 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -60,7 +60,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const std::vector dupes; + insp::flat_set dupes; bool check_dupes = (extra < 0); /* Create two sepstreams, if we have only one list, then initialize the second sepstream with @@ -327,10 +327,38 @@ 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) + , flags_needed(0) + , min_params(minpara) + , max_params(maxpara) + , use_count(0) + , disabled(false) + , works_before_reg(false) + , allow_empty_last_param(true) + , Penalty(1) +{ +} + CommandBase::~CommandBase() { } +void CommandBase::EncodeParameter(std::string& parameter, int index) +{ +} + +RouteDescriptor CommandBase::GetRouting(User* user, const std::vector& parameters) +{ + return ROUTE_LOCALONLY; +} + +Command::Command(Module* mod, const std::string& cmd, unsigned int minpara, unsigned int maxpara) + : CommandBase(mod, cmd, minpara, maxpara) + , force_manual_route(false) +{ +} + Command::~Command() { ServerInstance->Parser.RemoveCommand(this);