diff --git a/CommandList.cpp b/CommandList.cpp index 5da5c64..b97386e 100644 --- a/CommandList.cpp +++ b/CommandList.cpp @@ -16,15 +16,13 @@ namespace core { } bool CommandList::processRequest(std::string request, Session *session) { - bool found = false; for(auto *command : commands) { if(command->check(request)) { command->processCommand(request, session); - found = true; - break; + return true; } } - return found; + return false; } int CommandList::processCommand(std::string request, Session *session) {