diff options
author | Sadie Powell <sadie@witchery.services> | 2020-02-27 11:01:32 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-03-05 20:47:18 +0000 |
commit | 1899ce4e2151dd1ea5741df106ba1e71c63eb0b2 (patch) | |
tree | 1d63ba6ba44883f3e1b91df1bfc93f6885fba792 /src | |
parent | 9a0046a709e1fe9236d54838e2de530813972400 (diff) |
Move user command stuff from CommandBase to Command.
Diffstat (limited to 'src')
-rw-r--r-- | src/command_parse.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 0405a5659..f8c88a9f0 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -290,7 +290,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman return; } - if ((user->registered != REG_ALL) && (!handler->WorksBeforeReg())) + if ((user->registered != REG_ALL) && (!handler->works_before_reg)) { user->CommandFloodPenalty += failpenalty; user->WriteNumeric(ERR_NOTREGISTERED, command, "You have not registered"); @@ -327,13 +327,9 @@ void CommandParser::RemoveCommand(Command* x) 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) - , works_before_reg(false) , allow_empty_last_param(true) - , Penalty(1) { } @@ -352,7 +348,11 @@ RouteDescriptor CommandBase::GetRouting(User* user, const Params& parameters) 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) { } |