28 lines
482 B
C++
28 lines
482 B
C++
#include "Command.h"
|
|
#include "Session.h"
|
|
|
|
namespace core {
|
|
|
|
void Command::output(Session *session) {}
|
|
|
|
bool Command::check(std::string request) {
|
|
if(request != "") {
|
|
if(name.length() > 0) {
|
|
size_t start = request.find_first_not_of(" ");
|
|
if(name == request.substr(start, name.length()))
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|
|
void Command::setName(std::string name) {
|
|
this->name = name;
|
|
}
|
|
|
|
std::string Command::getName() {
|
|
return name;
|
|
}
|
|
|
|
}
|