diff options
Diffstat (limited to 'src/operator-lsub.cc')
-rw-r--r-- | src/operator-lsub.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/operator-lsub.cc b/src/operator-lsub.cc index 375ffcc..c4d1908 100644 --- a/src/operator-lsub.cc +++ b/src/operator-lsub.cc @@ -40,9 +40,9 @@ const string LsubOperator::getName() const return "LSUB"; } -int LsubOperator::getState() const +Session::State LsubOperator::getState() const { - return Session::AUTHENTICATED | Session::SELECTED; + return Session::State(Session::AUTHENTICATED | Session::SELECTED); } Operator::ProcessResult LsubOperator::process(Depot &depot, Request &command) @@ -179,16 +179,20 @@ Operator::ProcessResult LsubOperator::process(Depot &depot, Request &command) } } - return OK; + return Operator::ProcessResult::OK; } -Operator::ParseResult LsubOperator::parse(Request &c_in) const +Parser::ParseResult LsubOperator::parse(Request &c_in) { + constexpr auto ACCEPT = Parser::ParseResult::ACCEPT; + constexpr auto ERROR = Parser::ParseResult::ERROR; + constexpr auto REJECT = Parser::ParseResult::REJECT; + Session &session = Session::getInstance(); if (c_in.getUidMode()) return REJECT; - Operator::ParseResult res; + Parser::ParseResult res; if ((res = expectSPACE()) != ACCEPT) { session.setLastError("Expected SPACE after LSUB"); return ERROR; |