Many changes to ServerCore

This commit is contained in:
barant committed 2021-07-23 08:57:27 -07:00
1 parent 6969ef0fbb
commit d445834af6
83 files changed
+666 -756

No files matched your search

+6 -7
View File
@@ -12,15 +12,14 @@ namespace core {
}
bool CommandList::processRequest(std::string request, TCPSession *session, std::stringstream &data) {
bool CommandList::processRequest(coreutils::ZString request, TCPSession *session, std::stringstream &data) {
if(session->grab != NULL)
return session->grab->processCommand(request, session, data);
return session->grab->processCommand(request, session, data);
else {
int pos = request.find(" ");
std::string function = pos == request.npos ? request: request.substr(0, pos);
for(auto *command : commands)
if(command->check(function))
return command->processCommand(request, session, data);
coreutils::ZString function = request.getTokenExclude((char *)" ");
for(auto *command : commands)
if(command->check(function))
return command->processCommand(request, session, data);
}
return false;
}